Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain how to retrieve data from two tables with one SQL statement?

1 Answer

0 votes
by (119k points)

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)
FROM TableA
INNER JOIN TableB ON TableA.Column_Name = TableB.Column_Name;

I suggest enrolling in this SQL training course by Intellipaat to learn SQL.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Apr 29, 2020 in SQL by Sudhir_1997 (55.6k points)

Browse Categories

...