怎样能把两个表的不同字段显示在同一列?
怎样写select语句,把A表的a字段和B表的b字段查询出并显示在一列?
------解决方案--------------------把A表的a字段和B表的b字段查询出并显示在一列?
select a from a
union all
select b a from b
------解决方案--------------------select cast(A.a as varchar)+ '| '+cast(B.b as varchar) from A,B where ......
------解决方案--------------------select a from A
union all
select b from B
------解决方案--------------------用union all