以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  迅速找到两个表之间的订单差异  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=192185)

--  作者:Hareen
--  发布时间:2024/6/2 10:38:00
--  迅速找到两个表之间的订单差异
狐表里面,有没有什么高级牛逼的代码,可以迅速的查找到两个表之间不同的订单号呢!A表有100万个订单号,B表有101万个订单号,怎么能把不同的1万个订单号筛选出来呢

--  作者:有点蓝
--  发布时间:2024/6/2 20:48:00
--  
用sql,类似:

select 订单号  from {A表} as a  where not exists(select 订单号 from {B表} as b where a.订单号=b.订单号) union select 订单号  from {B表} as a  where not exists(select 订单号 from {A表} as b where a.订单号=b.订单号)