两个表记录问题(急) 表table1与表table2都有个字段NUM,例如 表1的num字段:a1至-a200(共200个记录) 表2的num字段:a2,a3,a7...a101(不规则的70个记录),我现在想要是表1与表2对比扣除相同的记录值(表1还有130个与表2不同的记录)如何做到,最好有例子,谢谢..... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from table1 where num not in (select num from table2) 如果只是想把不同的记录筛选出,可以用下面的语句'select 表1.Num from 表1 where 表1.Num not in ('select 表2.Num from 表2)' delete from 表1 a where exists (select 1 from 表2 b where a.Num = b.Num) select * from t_awhere not exists(select * from t_b where t_a.num=t_b.num)order by num/ select a.* from 表1 a where not exists (select 1 from 表2 b where a.Num = b.Num) select a.*,b.* from a,b where a.num<>b.num grid的问题,急!!! 非常初级的问题 助记码(输入字段的拼音第一个字符)如何实现? ★★★○○○如何同时实现无标题栏且可以拖动还具有PopMenu功能的窗体?○○○★★★ 谁用过ABC的控件(想实机QQ的那样的Outlook样式的东西)? DBGrid新增问题 ADO SQL SERVER 2000 小问题,大分数! corba中写接口方法更新数据库.急!急!急!急!急! 在delphi中怎样设置主从关系? 新手,一个基础问题? 400帮忙调试一个小问题,愿意的加qq13402043,另外的分数另外开帖送
'select 表1.Num from 表1 where 表1.Num not in ('select 表2.Num from 表2)'
delete from 表1 a where exists (select 1 from 表2 b where a.Num = b.Num)
where not exists(select * from t_b where t_a.num=t_b.num)
order by num
/
select a.* from 表1 a where not exists (select 1 from 表2 b where a.Num = b.Num)