-
A Sql Question
How to find all the tables containing column ,say 'COL1',in a schema?
Is there a dictionay view containing all columns info?
Thanks
-
Try:
select table_name
from dba_tab_columns
where column_name='COL1';
Good luck!
-
Code:
Select
Distinct Table_Name
From
DBA_TAB_COLUMNS
Where
OWNER = 'Schema_Name' AND
Column_Name = 'COL1'
;
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Originally posted by abhaysk
Code:
Select
Distinct Table_Name
From
DBA_TAB_COLUMNS
Where
OWNER = 'Schema_Name' AND
Column_Name = 'COL1'
;
Abhay.
abhaysk why distinct?
-
try this, u can get all info.
desc dba_tab_columns
-
That's what I want.
Thank you all so much
-
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
with sql:
select table_name
from dba_tab_columns
where column_name='COL1';
I get all tables and VIEWS that containing column 'COL1', if I only want the tables , not including views, what should i do?
-
Join with DBA_OBJECTS to elminate
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|