我有一个带有配置文件的配置单元表姓名,联系方式,地址,主题
Name Contact Address Subject
abc 1111 Mumbai maths
egf 2222 nashik science
pqr 3333 delhi history
And other table with schema **Name ,Contact**
Name Contact
xyz 4444
mno 2222
预期输出
Name Contact Address Subject
abc 1111 Mumbai maths
pqr 3333 delhi history
xyz 4444 null null
mno 2222 nashik science
我尝试了加入操作,但无法获得正确的输出
尝试以下操作:
select name, contact, address, subject
from table1
union all
select name, contact, NULL as address, NULL as subject
from table2