Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    8

    Unanswered: Reg System catalog tables

    Hi...can anyone please help me with the following query?

    Assuming that the create table statement is executed successfully,

    CREATE TABLE T1 (COL1 INTEGER NOT NULL, PRIMARY KEY(COL1))

    which 2 of the following system catalogs are updated?

    a) SYSCAT.INDEXES
    b) SYSCAT.PRIMARY KEYS
    c) SYSCAT.TABLES
    d) SYSCAT.NOTNULLABLECOLS
    e) SYSCAT.CONSTRAINTS

    I feel the answer is 'a' and 'c'...but i am not sure if there is any SYSCAT.CONSTAINTS...

    Please let me know the correct answers.

  2. #2
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    Yes a,c is the right ans.
    Details about primary keys can be found in syscat.indexes as unique indexes are always formed on creation of primary key.
    Foreign key constraints can be found in syscat.references

  3. #3
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    In addition, the COLUMNS catalog table is updated too; that's where NOT NULL conditions (and defaults) are stored.
    SYSCAT.CHECKS contains the check constraints. (None in this case.)
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  4. #4
    Join Date
    Dec 2005
    Posts
    8
    Thanks for the replies Rahul and Peter...really appreciate your help..!!

Posting Permissions

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