home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / datatl25.zip / DCTDSGN.Z / EWSQD2FK.QRY < prev    next >
Text File  |  1997-09-11  |  753b  |  29 lines

  1. #NAME#
  2. DA_DB2udbTableForeignKeys
  3. #DESCRIPTION#
  4. The DB2 UDB foreign keys impact analysis query returns the names of DB2 UDB tables with foreign keys which are constrained by the DB2 UDB table identified in the SQL WHERE clause.
  5.  
  6. View type: DAQDB2csTable
  7.  
  8. Modifications:
  9. Change the search criteria of the DB2 UDB table using the = (equals), IN or LIKE elements in the SQL WHERE clause.
  10.  
  11. #MODIFIED#
  12.  
  13. #VERSION#
  14. #SQL STATEMENT#
  15. --DA_DB2udbTableForeignKeys
  16. SELECT
  17.   t.db2csTable,
  18.   td.tableDefinition,
  19.   kd.primaryKeyDependentDB2csTable as dependentTable
  20. FROM
  21.   DAQDB2csTable t,
  22.   (t.usesTableDefinition) td,
  23.   (td.hasKeyDefinition) kd
  24. WHERE
  25.   t.db2csTable like '<>%' 
  26. ORDER BY
  27.   t.db2csTable,
  28.   kd.primaryKeyDependentDB2csTable;
  29.