We have to use joins to retrieve the data from two tables with one SQL statement. We join two tables on a particular condition and we can retrieve the data from multiple tables.
Suppose we have two tables TableA and TableB and here is the syntax to retrieve data from two tables:
SELECT TableA.column(s), TableB.column(s)
INNER JOIN TableB ON TableA.Column_Name = TableB.Column_Name;
I suggest enrolling in this SQL training course by Intellipaat to learn SQL.