27,579
社区成员
发帖
与我相关
我的任务
分享
select max(name) name,max(money) money
(
select name,null as money
from tb1
union all
select null,money
from tb2) t
select name=(第一个结果集),money=(第二个结果集)
SELECT
CASE WHEN EXISTS(select 1 from S s where t.a=s.code ) THEN s.codeDesc END AS A,
CASE WHEN EXISTS(select 1 from S s where t.B=s.code ) THEN s.codeDesc END AS B
FROM T ,S WHERE T.code =S.code
??