首页 > 数据库技术 > 详细

SQL查找某一条记录的方法

时间:2016-01-29 22:43:07      阅读:259      评论:0      收藏:0      [点我收藏+]
SQL查找第n条记录的方法:
select top 1 * from table where id not in (select top n-1 id from table) temptable0

SQL查找第n条开始的m条记录的方法:
select top m * from table where id not in (select top n-1 id from table) temptable0)

(注:表中必须有一个唯一值字段才可适用此方法。) 

SQL查找某一条记录的方法

原文:http://www.jb51.net/article/9741.htm

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!