Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Question Unanswered: Restrict The Number Of Records From Query

    Hi,

    ive a table of over 90,000 records . is ther any method for restricting the number of records returned by a SELECT query

    i want to implement a query system which will give me the first 50 records, next 50 ,... and so on


    can ne body help ?
    Cheers....

    baburajv

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523

    Re: Restrict The Number Of Records From Query

    Originally posted by baburajv
    Hi,

    ive a table of over 90,000 records . is ther any method for restricting the number of records returned by a SELECT query

    i want to implement a query system which will give me the first 50 records, next 50 ,... and so on


    can ne body help ?
    select top 50 from table_name

  3. #3
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250
    SELECT TOP 50 FROM TABLE_NAME

    WILL RETURN THE TOP 50 ROWS FROM THE TABLE

    HOW CAN I RETRIEVE THE NEXT 50 ROWS
    Cheers....

    baburajv

  4. #4
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    Originally posted by baburajv
    SELECT TOP 50 FROM TABLE_NAME

    WILL RETURN THE TOP 50 ROWS FROM THE TABLE

    HOW CAN I RETRIEVE THE NEXT 50 ROWS
    I think then u need to use temperory tables for it.

  5. #5
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    select top NUMBER_OF_ROWS *
    from table
    where column NOT IN
    (select top BEGIN_AT column
    from table)
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •