日期:2014-05-18  浏览次数:20428 次

超难得问题
在查询的时候怎么将只有一条记录的数据过滤掉,只查找出有1条以上的记录

------解决方案--------------------
create table #(id int identity,id1 varchar(2))
insert into # select 1
union all select 1
union all select 2
union all select 3
union all select 3
select a.id,a.id1 from # a ,# b where a.id1=b.id1 and a.id <> b.id