var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Finding referential constraints
can i get DB2 equivalent of this oracle Query.
this is to get all foreign key constraints which are dependent on table 'ABC'
Select * from user_constraints
where R_constraint_name=( select constraint_name from user_constraints
where constraint_type='P' and table_name='ABC')
And also where can we find a list of all constraints under a schema ?
select ... from syscat.references where reftabname = 'ABC'
(don't know enough O to know exactly what you want. You might also need a join onto syscat.keycoluse.
select ... from syscat.colchecks where tabschema = 'AAAA'
Here is the exact SQL i was looking for
select constname , tabschema, tabname,definer, reftabname,fk_colnames,pk_colnames
from syscat.references where tabschema='DB2INST1' and reftabname='ABC'
This will give all the tables with column names dependent on table 'ABC'