to know table name of specific data [message #247219] |
Mon, 25 June 2007 02:09 |
durai
Messages: 38 Registered: December 2006
|
Member |
|
|
vanakkam/hi to all
i have one question,
if i am giving a value/data(say for eg chennai) is it possible to get the tables which all containing chennai
correct me if i wrong
advance thanx to all,
|
|
|
|
Re: to know table name of specific data [message #247229 is a reply to message #247221] |
Mon, 25 June 2007 03:00 |
ammishra
Messages: 179 Registered: January 2007 Location: india
|
Senior Member |
|
|
i am not sure but you can do like that ..
you can use "user_tab_columns" table where you will get tables name and column name ...select record one by one from this table and use like command on that colomn
--Yash
|
|
|
|
|
Re: to know table name of specific data [message #247284 is a reply to message #247280] |
Mon, 25 June 2007 06:25 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
balaji23_d wrote on Mon, 25 June 2007 12:17 | Query like this:
select table_name from user_tab_column where column_name='chennai';
|
Hmm, that might work if you have designed your tables by wrapping column names in double quotes but NORMALLY column names are in upper case.
Also, I think that you may have mis-understood the question (or maybe I did) I believe that the OP is looking for all tables that CONTAIN DATA equal to (for example) 'chennai' not alll tables that contain columns CALLED chennai.
As Michel, correctly (as per usual) pointed out, the OP will have to select all columns from all tables to get the answer to his question.
Once again, Michel, you beat me to the punch
[Updated on: Mon, 25 June 2007 06:26] Report message to a moderator
|
|
|
Re: to know table name of specific data [message #247466 is a reply to message #247219] |
Tue, 26 June 2007 00:57 |
durai
Messages: 38 Registered: December 2006
|
Member |
|
|
It is NOT the column name that is 'chennai' it is the data in the column.
ya what michel said was right
i need the tables which containing the data chennai
what i want is like GREP in unix to search a data
i tried all_tables, dba_tab_columns
but i couldn't get the answers
ok any way thanx for all who have answered
and i am very grateful to u all
bye take care
|
|
|