Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Question Unanswered: limiting row return by count

    Does Informix have a function similar to Oracle's "rownum" command to limit the number of rows returned on a query?

    Oracle example: select * from test_tbl where rownum < 10;

  2. #2
    Join Date
    Aug 2003
    Location
    India
    Posts
    262

    Re: limiting row return by count

    Originally posted by mznvz8
    Does Informix have a function similar to Oracle's "rownum" command to limit the number of rows returned on a query?

    Oracle example: select * from test_tbl where rownum < 10;
    Hi there,

    you can use "rowid" in informix.

    Regards,

    lloyd

  3. #3
    Join Date
    Nov 2003
    Location
    Mumbai, India
    Posts
    92
    Hi,

    You may also use FIRST keyword to to limit the number of rows returned in a query.

    example:
    select first 5 * from test_tbl ;

    Regards,
    Shriyan

  4. #4
    Join Date
    Jan 2004
    Location
    Somerset
    Posts
    5
    Originally posted by vpshriyan
    Hi,

    You may also use FIRST keyword to to limit the number of rows returned in a query.

    example:
    select first 5 * from test_tbl ;

    Regards,
    Shriyan
    My 2c

    This first 5 method is much better - on one of my tables the rowid starts at 259 - so 'where rowid < 6' does not return anything, but 'first 5' gives 5 returns.

Posting Permissions

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