假设id是主键:
select *
from (select top xxx * from yourtable) aa
where not exists(select 1 from (select top xxx-1 * from yourtable) bb where aa.id=bb.id)
select *
from (select top xxx * from yourtable) aa
where not exists(select 1 from (select top xxx-1 * from yourtable) bb where aa.id=bb.id)
解决方案 »
- 求个sql语句,谢谢
- 请教一条查询语句的优化!
- 请教:两个异地数据库,要把甲数据库中一表定时复制到乙数据库,如何只复制新增的数据而筛除前次已复制数据。
- 请教SQL批量修改数据库语句
- selecl语句存在一个变量里,想要在Transact SQL中,得到这条SQL语句的结果放到一个变量
- 这样的情况能只用SQL来搞定吗?
- 求XP系统下SQL SERVER 2000 企业管理器可用查询分析器跟事件探查器无法启动,在线等,谢谢
- 怎么才能把数据从一个服务器搬到另一个服务器
- 应用SQL的复制服务的问题——pubid问题
- 请问如何sql server的数据库如何做【全文检索】??help
- 请问怎么能够得到正确得当前得日期和时间参数!!!
- 简单问题100分等你,SQl的小问题
fetch absolute [number] from [cursor_name]
行数为绝对行数