表A,有“列1、2、3,列4、5、6”第一个select根据列1查询到列2、3,第二个select根据列4,查询到列5、6,怎么才能使得到的结果只有两列,第一列包含列2、5的结果,第二列包含列3、6的结果。请赐教
select 列2, 列3 from A where (列1筛选条件) union all select 列5, 列6 from A where (列4筛选条件)
若有帮助,请采纳~
我看得头晕眼花
union all
弄一个测试数据出来,然后想得到什么结果 的数据也弄出来