这是我的一次笔试题,是查询一个表(id,name)中重复的记录:

sql语句:select  *  from  表名 where   name   in  (select  name  from  表名  having  count(name)>1)



sql学习文档:http://sql.1keydata.com/cn/
posted on 2008-09-12 11:50 李威威 阅读(1084) 评论(1)  编辑  收藏
Comments
  • # re: 查询重复记录sql[未登录]
    Alex
    Posted @ 2009-05-04 23:42
    select name from 表名 group by name having count(name)>1  回复  更多评论   

只有注册用户登录后才能发表评论。


网站导航: