SQL:找出数据表某个字段中重复的值并显示

上一篇 / 下一篇  2011-03-09 09:53:52 / 个人分类:SQL

【第一次写于 2010-05-05 16:34:53 网易blog:http://blog.163.com/chaosumin@126/blog

例子:
create table Student
  (StudentID char(10),
  Name char(10))
找出出现两次以上的名字
select Name
from Student
group by Name
having count (distinct StudentID) >= 2

TAG: SQL 查询

 

评分:0

我来说两句

日历

« 2024-04-20  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 9929
  • 日志数: 12
  • 建立时间: 2011-03-09
  • 更新时间: 2012-07-29

RSS订阅

Open Toolbar