我有两个列的视图,
view1 = (ID, Number)
view2 = (ID, Number, Name)
如何创建选择显示
Display = (ID, Number, Name)
和Display是FULL OUTER JOIN view1和view2。
答案 0 :(得分:1)
SELECT view2.*
FROM view1
LEFT JOIN view 2
ON view1.id = view2.id
UNION
SELECT view2.*
FROM view1
RIGHT JOIN view 2
ON view1.id = view2.id