34,576
社区成员
发帖
与我相关
我的任务
分享
select * from a inner join b on a.KTPAY = b.KTPAY
inner join c on a.KTPAY = c.KTPAY
inner join d on a.KTPAY=d.KTPAY
where a.KTPAY = 'uuu'
select * from a inner join b on a.KTPAY='uuu' = b.KTPAY='uuu'
inner join c on a.KTPAY='uuu' = c.KTPAY='uuu'
inner join d on a.KTPAY='uuu' = d.KTPAY='uuu'
select * from A where KTPAY='uuu'
union all
select * from B where KTPAY='uuu'
union all
select * from C where KTPAY='uuu'
union all
select * from D where KTPAY='uuu'
order by id
select * --这里列举除了tbname外的其他字段
from
(select 'a' as tbname,* from a
union all
select 'b',* from b
union all
select 'c',* from c
union all
select 'd',* from d
) t
where ktpay='uuu' and tbname='b'
order by id
select * from A where KTPAY='uuu'
union all
select * from B where KTPAY='uuu'
union all
select * from C where KTPAY='uuu'
union all
select * from D where KTPAY='uuu' order by id
select * from A where 条件
union all
select * from B where 条件
union all
select * from C where 条件
union all
select * from D where 条件
order by uid
select * from A where KTPAY='uuu'
union all
select * from B where KTPAY='uuu'
union all
select * from C where KTPAY='uuu'
union all
select * from D where KTPAY='uuu'
order by id