selecting number of rows from resultset

Posted by sap on Stack Overflow See other posts from Stack Overflow or by sap
Published on 2010-03-12T10:15:24Z Indexed on 2010/03/12 10:17 UTC
Read the original article Hit count: 143

Filed under:
|
|

Suppose a query "select * from employee" returns 80 rows. I need to display middle rows that is from 20th row to 50th row.

I know, like to display first 20 rows we have option like "select top 20 * from employee" but if we need middle rows how to get it in MS SQL specifically.

I m new to this SQL queries...Can anybody answer to this question.

© Stack Overflow or respective owner

Related posts about mssql-2005

Related posts about query