当前位置: 代码迷 >> Sql Server >> 超难得有关问题
  详细解决方案

超难得有关问题

热度:84   发布时间:2016-04-27 18:55:15.0
超难得问题
在查询的时候怎么将只有一条记录的数据过滤掉,只查找出有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
  相关解决方案