开发者

how to join more than 2 table using sql Query?

开发者 https://www.devze.com 2023-01-15 07:25 出处:网络
supposei have more th开发者_开发问答an 2 table and i want to join the specific column to be join .for this what is query? example:

suppose i have more th开发者_开发问答an 2 table and i want to join the specific column to be join .for this what is query?


example:

select a.column1, a.column2, b.whatever, c.hello
from table1 a
join table2 b on a.keyfield = b.keyfield
join table3 c on a.keyfield = c.keyfield

If you wanted all records from table1 even without a matching record in another table, then the join should be "left join" instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消