MSSQL:
SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY (select 0)) as ROWID, * FROM Products) VM WHERE VM.ROWID BETWEEN n AND m
MySQL:
SELECT * FROM Products LIMIT n, (m-n+1)
沒有留言:
張貼留言