I have some 3 particular fields ..i want to know which all
tables have those 3 fields. Is there any way to identify..
can we know by quering system tables..
Answers were Sorted based on User's Feedback
Answer / srini
select * from sysibm.syscolumns where name = <name you 3
columns here>
The above query to metadata will show you the list of table
names where these 3 columsn present
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / dalwinder singh--intense tech
db2 "select name ,tbname ,typeschema,source_tabname from
sysibm.syscolumns where name='coloumn name'"
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rajnish kumar
SELECT R.TABSCHEMA , R.TABNAME FROM
(select TABSCHEMA,TABNAME,COLNAME from syscat.columns where
COLNAME='ROLL') R
INNER JOIN
(select TABSCHEMA,TABNAME,COLNAME from syscat.columns where
COLNAME='NAME') N
ON R.TABNAME=N.TABNAME AND R.TABSCHEMA= N.TABSCHEMA
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / apoorv sharma
Learn SQL Trace for that... Tcode is ST05.
After this u will come to know which table contain those fields
| Is This Answer Correct ? | 0 Yes | 0 No |
select name ,tbname ,typeschema,source_tabname from
sysibm.syscolumns where name='coloumn name'
This statement will work.
You can try this command also.
select tabname,colname
from syscat.columns
where COLNAME='ID'
and tabschema='MYSCHEMA'
| Is This Answer Correct ? | 0 Yes | 0 No |
Why PS file called Physical seqential file?How to sore data in sequential file and ESDS file? What is the use of DBRM,PLAN,package and Collection.
What is the maximum size of a char data type in db2?
What is declare cursor?
What is the difference between spufi and qmf?
What does CURRENTDATA option in bind indicate
Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
How can you quickly find out the # of rows updated after an update statement?
What is the picture clause of the null indicator variable?
How to find schema of a table in db2?
Hi Team, Please tell me, If i don't declare the cursor in the program and i have given open and fetch and close, then what error will get.
What is null indicator in db2?