SQL Server 2000 Row Limits

Discussion in 'MySQL' started by cancer10, Jul 2, 2007.

  1. #1
    i All,

    I have 20,000 records in my database

    Is there any way i can run a sql query that can fetch the first 5000 row, then the next 5000 row and so on?

    I do not want to fetch 20,000 rows at a time.


    Plz help.


    THanx
     
    cancer10, Jul 2, 2007 IP
  2. flippers.be

    flippers.be Peon

    Messages:
    432
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what db do you use ?

    on sql server use top()
    on sql server 2005 you can use use row_number()
    on oracle rowcount()

    no idea on mysql..
     
    flippers.be, Jul 2, 2007 IP
  3. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I use ms sql 2000

    Top or set rowcount is of no use, since I do not have a id column.

    MYSQL uses LIMIT 0,5000

    and I want something similar to it
     
    cancer10, Jul 2, 2007 IP
  4. Clark Kent

    Clark Kent Guest

    Messages:
    122
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Clark Kent, Jul 2, 2007 IP