学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

求一SQL语名,用的是SQL数据库,怎样取出倒序排列top10的第二条记录

求一SQL语名,用的是SQL数据库,怎样取出倒序排列top10的第二条记录

求一SQL语名,用的是SQL数据库,怎样取出倒序排列top10的第二条记录

TOP

select * from tb where id not in(select top 1 id fom tb order by id desc) order by id desc

TOP

引用:
以下是引用 wklhdt 在 2008-3-4 16:47 的发言:

select * from tb where id not in(select top 1 id fom tb order by id desc) order by id desc
看不太懂,能解释一下吗?

TOP

这个第二条记录怎么取呢

TOP

select top 1 * from tb where id not in(select top 1 id fom tb order by id desc) order by id desc
http://www.intoclass.cn找到组织!找到党!

TOP

发新话题