SQL查找某一條記錄的方法
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)
(注:表中必須有一個唯一值字段才可適用此方法。)
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END