找回密碼
 註冊
搜索
查看: 3695|回復: 0

MSSQL 與 MySQL Limit 相同功能之語法

[複製鏈接]
發表於 2012-11-22 10:26:05 | 顯示全部樓層 |閱讀模式
MySQL:[code=sql]select * from table limit 5,30[/code]
MSSQL:[code=sql]select * from (select row_number() over (order by id) as row_num,* from table)
t where row_num between 5 and 30[/code]
Reference: http://tw.zhidao.baidu.com/question/2252883.html
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|彩色筆小沛的知識庫

GMT+8, 2024-11-21 16:53 , Processed in 0.018898 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表