Home » SQL & PL/SQL » SQL & PL/SQL » find column name in database
find column name in database [message #246868] Fri, 22 June 2007 04:57 Go to next message
ganesh_jadhav0509
Messages: 63
Registered: May 2007
Location: Chester
Member

Dear all,

i have a query

How can i comes to know that specific column name is used in which tables?

means suppose,

i use deptno column in emp and dept tables then how can i find out with one query that deptno is used in these tables

Re: find column name in database [message #246869 is a reply to message #246868] Fri, 22 June 2007 04:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
dba_tab_columns

Regards
Michel
Re: find column name in database [message #247005 is a reply to message #246868] Fri, 22 June 2007 15:39 Go to previous message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
select owner,table_name
from all_tab_columns
where column_name = 'COLUMN_NAME';


oracle stores column names (normally) in uppercase. Make sure that the column name within quotes is in uppercase.
Previous Topic: create a view in schema1 that references a view in schema2
Next Topic: padding ";" in the table result
Goto Forum:
  


Current Time: Tue Dec 06 00:30:59 CST 2016

Total time taken to generate the page: 0.28499 seconds