select organnum,EnterpriseNum,AA00001,AA00003 from IC_Enterprise
where AB11005 like '%003863%'
union
select d.organnum,d.EnterpriseNum,d.AA00001,d.AA00003 from IC_Enterprise d
where exists (select 1 from bg_bgqkb a where a.bgqz like '%003863%' and a.aa00001=d.aa00001)
试试这个,我认为union 在这种情况下应该能快些!
where AB11005 like '%003863%'
union
select d.organnum,d.EnterpriseNum,d.AA00001,d.AA00003 from IC_Enterprise d
where exists (select 1 from bg_bgqkb a where a.bgqz like '%003863%' and a.aa00001=d.aa00001)
试试这个,我认为union 在这种情况下应该能快些!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货