Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

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
0
deanlee17
Asked:
deanlee17
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
no, this is not possible in oracle sql.
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
yes it is possible in an order by clause. something like as shown below :

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

0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
As AngelIII said already, it is not possible in the select list.
0
 
deanlee17Author Commented:
Ok thanks guys.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now