I have 100 records in which i can select top 10 using the ‘TOP 10’ in the query. Similarly is there anything to get the 20th to 30th record?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you are using SQL Server 2005 you can use the ‘new’ ROW_NUMBER() function. This will give you row 11 to 20:
If you have a lot of records, using TOP X in the inner SELECT clause may speed up things a bit as there is no use returning 1000 records if you are only going to grab records 11 through 20:
Source