Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Posts
    4

    Unanswered: Why SYSCAT.TABCONST is empty?

    I am trying to get PRIMARY KEY and Foreign Key from DB2. The only way that I can think is to get information from syscat.tabconst system table. But the table is empty. I have run "Runstats on table ...", but it is still empty. Do you know how I can get infromation from there?

    Also, can you suggest any other way that I can get Primary Keys?

    Thanks in advance!

    regards,
    aproxy

  2. #2
    Join Date
    Feb 2002
    Posts
    96

    Thumbs up Re: Why SYSCAT.TABCONST is empty?

    You can get the primary key from syscat.indexes.

    Select * from syscat.indexes where uniquerule='P'

    Regards.

  3. #3
    Join Date
    Feb 2002
    Location
    Germany
    Posts
    141
    Look at SYSIBM.SYSRELS
    Rodney Krick

Posting Permissions

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