Table of Contents

Search

  1. Preface
  2. Introduction to PowerExchange
  3. DBMOVER Configuration File
  4. Netport Jobs
  5. PowerExchange Message Logs and Destination Overrides
  6. SMF Statistics Logging and Reporting
  7. PowerExchange Security
  8. Secure Sockets Layer Support
  9. PowerExchange Alternative Network Security
  10. PowerExchange Nonrelational SQL
  11. PowerExchange Globalization
  12. Using the PowerExchange ODBC Drivers
  13. PowerExchange Datatypes and Conversion Matrix
  14. DTL__CAPXTIMESTAMP Time Stamps
  15. PowerExchange Glossary

DTLDESCRIBE FKEYS Foreign Keys Information Retrieval

DTLDESCRIBE FKEYS Foreign Keys Information Retrieval

Example 1:
Given a table, find all the foreign keys defined on that table.
Table MFERNANDEZ.T2 has two foreign keys.
(FK21) to T1 from column T21 to T11 with UPDATE rule RESTRICT and DELETE rule = DELETE
and
(FK23) to T3 from columns T22,T23 to T31,T32 with UPDATE rule NOACTION and DELETE rule = NOACTION
DTLDESCRIBE fkeys,,,,mfernandez,,t2
Example 1 Result:
MFERNANDEZ||T1|T11|MFERNANDEZ||T2|T21|1|RESTRICT|RESTRICT|FK21|SQL010827171053710| MFERNANDEZ||T3|T31|MFERNANDEZ||T2|T22|1|NO ACTION|NO ACTION|FK23|PK3| MFERNANDEZ||T3|T32|MFERNANDEZ||T2|T23|2|NO ACTION|NO ACTION|FK23|PK3|
Example 2:
Given a "parent table", find all the foreign keys that point to that table
DTLDESCRIBE fkeys,mfernandez,,t1
Example 2 Result:
MFERNANDEZ||T1|T11|MFERNANDEZ||T2|T21|1|RESTRICT|RESTRICT|FK21|SQL010827171053710|
It is valid to query on both the parent and the foreign tables as shown below.
DTLDESCRIBE fkeys,mfernandez,,t*,mfernandez,,q*