Chinaunix

标题: 请教!!! [打印本页]

作者: pochuan2000    时间: 2004-06-19 13:31
标题: 请教!!!
比如表1中id有80,但是用select * from person是90,用select distinct id from person就是89条记录,请问用什么语句可以把这张表的重复的id号码的数据查出来!!!!
作者: magicangel    时间: 2004-06-19 14:48
select * from person where id in(
select id from person
group by id
having count(1)>1)




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2