答案 0 :(得分:1)
我认为以下内容可以与联盟一起使用。它将对两个表进行全表扫描,如果这些表有大量数据,这可能是一个值得关注的问题。请先检查查询计划。
select A_INFRASTRUCTURE_CHANGE_ID, A_Name_c, A_Support_group, B_INFRASTRUCTURE_CHANGE_ID, B_Steps_c, B_Support_group
FROM
(SELECT INFRASTRUCTURE_CHANGE_ID as A_INFRASTRUCTURE_CHANGE_ID, Name_c as A_Name_c,
Support_group as A_Support_group, NULL as B_INFRASTRUCTURE_CHANGE_ID , NULL as B_Steps_c, NULL as B_Support_group
FROM TABLE_A
UNION ALL
SELECT NULL as A_INFRASTRUCTURE_CHANGE_ID,NULL as A_Name_c,NULL as A_Support_group ,
INFRASTRUCTURE_CHANGE_ID as B_INFRASTRUCTURE_CHANGE_ID, Steps_c as B_Steps_c, Support_group as B_Support_group
FROM TABLE_B);