Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    205

    Unanswered: MAX_ROWS keyword ?

    Hi all,

    Is there any keyword 'MAX_ROWS' in Oracle , coz I came across a query as follows :

    select sno from test where rownum < max_rows

    I doubt that 'max_rows' might be a local variable as I am not completely aware of the procedure in which this query occurred. Is there any keyword 'max_rows' in ORACLE ?

    Thanks,
    Sam

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    No, it must be a variable (or a column).

  3. #3
    Join Date
    Mar 2004
    Posts
    205
    Thanks for your Information.

  4. #4
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    There is no MAX_ROWS in Oracle, but you can use sub-query to get this information (not sure what do you mean by MAX_ROWS !!!) :

    SQL> connect demo/demo@db01
    Connected.
    SQL> create table t (id number, name varchar2(30));

    Table created.

    SQL> select name from t where rownum < (select max(id) from t);

    no rows selected

    SQL> select name from t where rownum < (select count(*) from t);

    no rows selected


    HTH,

    clio_usa - OCP 8/8i/9i DBA

Posting Permissions

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