DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: 1st row or nth row of the table

  1. #1
    Join Date
    May 2000
    Location
    fremont ca
    Posts
    182
    How can I select 1st row or nth row of the table.

  2. #2
    Join Date
    Jan 2001
    Posts
    153
    select 1,2,3,4,5 from tablex
    where
    rownum<=1
    minus
    select 1,2,3,4,5 from tablex
    where
    rownum<1

    this will return 1st row and subsequently change the values for the N th row..

    Rgds
    Vijay.s

  3. #3
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    1.
    Concept of SQL not garantee, then two some queries:
    select * from a;
    get equal order of rows.
    -----------------------------------
    In this case:
    select 1,2,3,4,5 from tablex
    where
    rownum<=1
    minus
    select 1,2,3,4,5 from tablex
    where
    rownum<1

    may be works correctly, may be not.
    ------------------------------------
    2.
    What do u mean ("1/n row from table") ?
    a) 1/n row in "phizical" order of store (u should use ROWID as order parameter)
    b) 1/n row in some order (u should use FIELD_NAME as order parameter)

Posting Permissions

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


Click Here to Expand Forum to Full Width