筛选问题求助 本帖最后由 hadis1230 于 2012-02-23 15:36:55 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 貌似就是你这么写.select * from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)或者:select distinct * from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件) 但是我的语句貌似只筛选出B表中不存在于A表的记录吧? 但是本身B表中可能会有几条是一样的记录的 现在的问题就是想从筛选后的记录中去掉重复的 呵呵 貌似是这个语句就可以了 select distinct 税号 from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件) 紧急求助:如下语句 如何写(纵向转横向),谢谢 请教表结构设计的问题 七七你帮问那个问题如何 求一关联查询的sql语句 为何我在删除SQL SERVER2000时总是删不掉````````````` nvarchar,varchar,text三种类型有什么区别? 存储过程临时表问题 sql server修改年日月 『』【求高手给帮看一下这个存储过程的写法】 触发器中执行exec @SQl时出错 列转行问题 求SQL解决方案 如何定义参数和局部变量
select * from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)或者:select distinct * from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)
select distinct 税号 from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)