To display database records b/w 100 -200

  • Dear Experts,

    Good Morning.Suppose i have 500 records in table name called author table.

    Question

    Is it possible to query data records betwen 100th record to 200 th record?

    Version:SQL Server 2005

  • as long as you know how the data will be ordered, row_number() function is probably the best solution:

    SELECT * FROM

    (

    SELECT row_number() over (ORDER BY YourColumn) As RW,

    * from YourTable

    ) MyAlias

    WHERE RW BETWEEN 200 and 300

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Team

    Have a nice day!!!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply