Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

db2 foreign keys

select 
    ref.tabschema  concat '.' concat ref.tabname as foreign_table,
    '>-' as rel,
    ref.reftabschema concat '.' concat ref.reftabname as primary_table,
    ref.constname as fk_constraint_name
from syscat.references ref
order by foreign_table, primary_table
Source by dataedo.com #
 
PREVIOUS NEXT
Tagged: #foreign #keys
ADD COMMENT
Topic
Name
7+1 =