ROWNUM returns as "invalid identifier" ROWNUM returns as "invalid identifier" oracle oracle

ROWNUM returns as "invalid identifier"


Your actual query might be using ROWNUM within double quotes. Otherwise, this error is not possible.

Though your first query would be ORA-00936: missing expression

select * from dual WHERE "ROWNUM" < =3;Error report -SQL Error: ORA-00904: "ROWNUM": invalid identifier00904. 00000 -  "%s: invalid identifier"*Cause:    *Action:

ROWNUM is a pseudo-column and it is like function without parameters.. and by the way "ROWNUM" makes oracle to search for such a column in your table..

Quoted identifiers when is a Oracle reserved keyword, would surpass its original purpose, and behaves as user defined column.

Unsure, of how to stop the Query builder to interpret this way. I would consider this a BUG.


Can try this approach:

SELECT * FROM    (SELECT ROWNUM R, * FROM ACCOUNTING WHERE ID = 123456 ORDER BY DATE) WHERE R < 2;


I believe when you select comma-delimited columns that includes the *, you need to alias the table.

SELECT A.ROWNUM, A.* FROM ACCOUNTING A WHERE ID = 123456 ORDER BY DATE