select * from 表1 where 编号=100
union all
select * from 表2 where 编号=100
2:
select * from
(select * from 表1
union all
select * from 表2 )t where 编号=100
其中表2的数据很多。
...全文
10511打赏收藏
这两条SQL查询哪条的效率高?
先union all 后查询和 先查询后 union all 哪个效率高? 1: select * from 表1 where 编号=100 union all select * from 表2 where 编号=100 2: select * from (select * from 表1 union all select * from 表2 )t where 编号=100 其中表2的数据很多。