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..

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various isolation levels possible?

651


How do I copy a table in db2?

578


How to restart a DB2 program?

1369


What are bind parameters in db2?

616


What action db2 takes when a program aborts in the middle of a transaction?

659






define clustering index.

622


Define check constraint.

647


Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?

2690


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

586


What db2 400?

682


What is a db2 package?

601


Explain about rct in db2?

644


What is the cobol picture clause of the db2 data types date, time, timestamp?

621


List out the three types of page locks that can be held.

689


My sql statement select avg(salary) from emp yields inaccurate results. Why?

647