Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002
    Posts
    3

    Red face Unanswered: Getting partial resultset in Oracle

    Hi
    I have table with huge number of records. Can i get few records(like 1 to 100, 100 to 200) at a time using only SQL(if possible). So i can show user partial data.

    MySQL supports this type of getting resultset with keyword 'limit'.

    regards
    sriram

  2. #2
    Join Date
    Apr 2001
    Location
    Netherlands
    Posts
    191
    With using only SQL you could use
    'where rownum < 100'

    If you need all rows, in portions of 100,I suggest you use PL/SQL
    Ruud Schilders
    -----------------
    Oracle DBA
    e-mail : ruud@schilders.it
    URL : www.schilders.it
    Twitter : www.twitter.com/ruudschilders

  3. #3
    Join Date
    May 2002
    Posts
    3

    Post Thanx

    thanx for the solution
    I was able to use that. It works fine for < 100, is there a way to use rownum>100 and rownum<200 . Once again SQL.

    regards
    sriram

  4. #4
    Join Date
    May 2002
    Location
    Southern California
    Posts
    4
    select 'x' from table
    where rownum between 1 and 200
    /

    Hope this helps.

    Alex

  5. #5
    Join Date
    May 2002
    Posts
    3

    Red face Thanx

    It works fine until i start with 1 and n.
    Is there a way so i can fetch 1 to 10, 11 to 20.
    Similar to search results shown in websites.
    Can any one answer me y it does not work though rownum is inserted along with record, just like any other data.

Posting Permissions

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