Home » Other » General » SQL Query
SQL Query [message #103332] Thu, 12 June 2003 23:29
Vibhu Bahl
Messages: 1
Registered: June 2003
Junior Member
I am unable to get the logic behind these two queries.
Answers should have been same logically but Oracle gives different results with these two queries.
Please explain.

Queries :
SQL> select ename from emp where rownum in (1,2);

ENAME
----------
JAMES
ALBERT

SQL> select ename from emp where rownum in (select rownum from emp where rownum in (1,2));

ENAME
----------
JAMES
JAMES

Thanks,
Vibhu Bahl
Previous Topic: FRM - 91116
Next Topic: Adding multiple computers onto ntl domestic broadband ??
Goto Forum:
  


Current Time: Sat Nov 23 09:30:50 CST 2024