Hi,
I am getting an error in this query....Whats wrong with it...
Am using Oracle 8i.
select distinct deptno,ename,sal,comm
from emp order by ename, empno desc;
ERROR at line 2:
ORA-01791: not a SELECTed expression
When i remove empno and run,i am getting resultset...
but it is not necessary that a order by column should be selected...
then why is it giving error...
The following works fine..
Select deptno,job,ename from emp order by deptno,sal desc;
Regards
