[英]Combining Data from multiple tables
我有兩個表如下表A
col1 col2 col3 col4
1 2 3 4
101 201 301 401
和另一個表 - 表 B
col1 col2 col3 col4
1 2 3 4
結果表C或結果應該是
結果
col1 col2 col3 col4 col5 col6 col7 col8
1 2 3 4 1 2 3 4
101 201 301 401 null null null null
基本上想在可用的地方保存表中的常用行。 我正在使用 MYSQL
select * from TableA a left join TableB b
on a.col1 = b.col1 and a.col2 = b.col2 and a.col3 = b.col3 and a.col4 = b.col4
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.