| 发表于:2007-05-26 11:50:176楼 得分:0 |
create table t(id int,goods varchar(10)) insert t select 1, 'xq ' union all select 2, 'xq ' union all select 3, 'gy ' union all select 4, 'gy ' select id,goods from t a where id in ( select top 1 id from t where goods=a.goods ) drop table t id goods ----------- ---------- 1 xq 3 gy (所影响的行数为 2 行) | | |
|