| 发表于:2007-06-28 14:18:423楼 得分:6 |
drop table a,b go create table a(mc varchar(10),bh int) insert into a select 'jc/m ',1 union all select 'kv/s ',2 union all select 'tm/ty ',3 union all select 'rt/b ',4 union all select 'ts/m ',5 create table b(bh int,name varchar(10)) insert into b select 1, 'm ' union all select 3, 'ts ' select * from a where not exists(select 1 from b where charindex(b.name,a.mc)> 0) /* mc bh ---------- ----------- kv/s 2 rt/b 4 (所影响的行数为 2 行) */ | | |
|