• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 522
  • 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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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