I Have a table with 60 rows data, But now I just want to get ten rows starting from the twentieth row, for example: give me records between 21 and 30. Is there a way can do it? yes, here is the code:
Btw : There should be a better way , If you've found one, just give me a feedback
SELECT TOP 10 *
FROM table1
WHERE id NOT IN (
SELECT TOP 20 id
FROM table1
ORDER BY id
)
ORDER BY id
FROM table1
WHERE id NOT IN (
SELECT TOP 20 id
FROM table1
ORDER BY id
)
ORDER BY id
Btw : There should be a better way , If you've found one, just give me a feedback