不太清楚你的意思,是不是只查出有ID重复的资料?
Select * from yourTable where ID in (select ID from yourTable group by ID having count(*) > 1)
Select * from yourTable where ID in (select ID from yourTable group by ID having count(*) > 1)
Select [ID],[Data] from tablename where [ID] in (select [ID] from tablename group by [ID] having count(*) > 1)
select * from tableName where id in (select id from tableName where sum(1)>1)
Select [ID],[Data] from tablename where [ID] in (select [ID] from tablename group by [ID] having count(*) > 1)
Select [ID],[Data] from tablename where [ID] in (select [ID] from tablename group by [ID] having count(*) > 1)
where (select count(*) from yourtable where id = A.id) = 2
select * from 你的表 where (select id from 你的表 group by id having sum(1)>1)
select * from 你的表 where (select id from 你的表 group by id having sum(1)>1)