Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    33

    Question Unanswered: Display key constraints at once

    Hi,

    Is there a query which can retrieves all
    key constraints ?

    Regards,
    Jags

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Mar 2003
    Posts
    280
    Quote Originally Posted by perumj1 View Post
    Hi,

    Is there a query which can retrieves all
    key constraints ?

    Regards,
    Jags
    For constraints in general:

    select constname, type from syscat.tabconst

    dependent on type you can retrive specific info from syscat.checks, syscat.references, etc. You could of course do this in one query, but you will have to transform the info from one or several of these tables so that they become union compatible.

    If it's only key constraints you are interested in, try syscat.keycoluse (join with tabconst if you need type)


    /Lennart

Posting Permissions

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