Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    1

    Unanswered: Foreign Key Information

    How can I use sql to get a description of a table's foreign keys? I'm looking for th following information:
    constraint_name
    column_name
    referenced_table
    referenced_column
    precedence_order of composite key element

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    That would be in the SYSCAT.REFERENCES and SYSCAT.KEYCOLUSE views. More information can be found here: System catalog views
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •