Select 某字段 from (Select top 100 * from 表) aa group by 某字段 having count(*) > 1
解决方案 »
- 数据库面试题
- 求 SQL 语句
- 表的转换问题
- 在线跪求一个SQL问题,感谢
- 求救,高难度sQL语句的编写,高分相送,来者有分
- 大力请回答 谢谢
- 高手帮忙:本人遇到一个SQLSERVER2000里的小问题,能帮帮我,分不够,解决了给你加。 帮帮忙啊?
- 为什么sql server数据库的numeric类型,在vb中录入会出错?
- Java中如何把窗体的文本框中输入的内容保存到mysql数据表里面,各位大神回复一下
- 数据库
- ’存储过程‘到底有什么用?
- 关于表间关系的问题~!!“SQL Server 将确保 ServiceCall 数据库不会在 ServiceCall 表中包含这样的行,即其 CustomerID 不会出现在 Cu
select top n 字段 from tablename where id not in (select max(id) from tablename group by 要查的重复字段)
没有ID的情况select identity(int,1,1) as id,* into #temp from tabel
delect # where id not in (
select max(id) from # group by col1,col2,col3...)
delect table
inset into table(...)
select ..... from #temp