Link to home
Start Free TrialLog in
Avatar of deanlee17
deanlee17

asked on

SQL referencing a column number

Hi Experts,

Is it possible in Oracle SQL to refer to a column by its number rather than the actual name of the column?....

i.e

Select (col1)
From
Where

Thanks,
Dean
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes it is possible in an order by clause. something like as shown below :

select deptno, deptname
from dept
order by 2, 1 desc

As AngelIII said already, it is not possible in the select list.
Avatar of deanlee17
deanlee17

ASKER

Ok thanks guys.