SQL to determine RI constraints hierarchy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brion m
    New Member
    • Feb 2008
    • 3

    SQL to determine RI constraints hierarchy

    Hi,

    I was wondering if anyone has SQL (to maybe create a view) that would show RI constraint relationships. This would be very useful when the load order is required.
  • sakumar9
    Recognized Expert New Member
    • Jan 2008
    • 127

    #2
    You can find the information about constraints by checking system tables. These tables are:

    SYSIBM.TABLE_CO NSTRAINTS
    SYSIBM.CHECK_CO NSTRAINTS
    SYSIBM.REFERENT IAL_CONSTRAINTS
    SYSIBM.REF_CONS TRAINTS

    You can use SQL or you can also write an application to display the hierarchy.


    Regards
    -- Sanjay

    Comment

    • brion m
      New Member
      • Feb 2008
      • 3

      #3
      Originally posted by sakumar9
      You can find the information about constraints by checking system tables. These tables are:

      SYSIBM.TABLE_CO NSTRAINTS
      SYSIBM.CHECK_CO NSTRAINTS
      SYSIBM.REFERENT IAL_CONSTRAINTS
      SYSIBM.REF_CONS TRAINTS

      You can use SQL or you can also write an application to display the hierarchy.


      Regards
      -- Sanjay

      Thanks Sanjay, i will have a go at this.
      regards
      brion

      Comment

      Working...