Solved

SQL referencing a column number

Posted on 2010-11-26
4
515 Views
Last Modified: 2012-06-21
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
Comment
Question by:deanlee17
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 34216658
no, this is not possible in oracle sql.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34216662
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
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34216667
As AngelIII said already, it is not possible in the select list.
0
 

Author Comment

by:deanlee17
ID: 34216690
Ok thanks guys.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question