Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get column names?

Status
Not open for further replies.

lakshmivaragan

Programmer
Sep 30, 2003
25
0
0
IN
Hi,
I understand that column names of table can be got from "cols" or "col" system table.
If I login as "system", I want to get the column names of table which belong to particular user/schema.
In the "cols" or "col" system table, there is no column for schema. How can I get column names of table of particular schema when I login as "system" ?

Regs
Lax
 
Lax,

select column_id,column_name
from dba_tab_columns
where owner = 'UPPER-CASE SCHEMA NAME'
and table_name = 'UPPER-CASE TABLE NAME'
order by column_id;

You can also run code, above, from ALL_TAB_COLUMNS.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 06:12 (31Dec03) GMT, 23:12 (30Dec03) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top