Snippet
1 Upvote

Join on Multiple Columns in SQL Query

SQL - Querying

Joins - Multiple

Joining tables in SQL on more than one column works in the same way as joining a single column but we simply add "and" between the join conditions.
select *
from table_1 a
join table_2 b
on a.column_1= b.column_1 and a.column_2 = b.column_2

By analyseup - Last Updated Aug. 29, 2021, 2:54 p.m.

Comments
Related Snippets
Snippet
Upvotes
Creator