Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有table1columnsA , B , C和另一个,table2with columns A, D。
table1
A , B , C
table2
A, D
我想创建一个视图来显示列,即使没有列A, B, C, D也应该有列的所有值AAtable2
A, B, C, D
A
我试过了:
select a, b, c, d from table 1 inner join table 2 where table1.a = table2.a
提出一些建议
您将需要使用 OUTER JOIN:
SELECT t1.a, t1.b, t1.c, t2.d FROM table t1 LEFT JOIN table t2 ON t1.a = t2.a;