Database Administration (MOSC)

MOSC Banner

How Can I query a table by column postion and what is the syntax

edited Apr 5, 2010 7:21AM in Database Administration (MOSC) 7 commentsAnswered
Oracle is currently working on an SR on this topic, while we are diagnosing the problem we are opening up this question to our user community so they can add perspective to the solution based on their real world experience

To select the second column of a given table, 

SELECT COLUMN_NAME FROM DBA_TAB_COLUMNS WHERE TABLE_NAME = '<table name>'
and COLUMN_ID = '2';

Now you can query on the second column of your table in question.

Any other suggestions?

Regards,
Suntrupth

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center