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

    Unhappy Unanswered: How can I find out if a field of a view the primary key of a table?

    Hello,

    I have the name of a view and I have to find out if a field of the view is a primary key.

    More Information:
    I have to redesign a programm that reads the position of the primary keys from a table. For that I read the Field KEYSEQ from SYSIBM.SYSCOLUMNS. But in the new Version I can only use views.

    Does somebody has a solution?

    Thanks,

    Ralf

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How can I find out if a field of a view the primary key of a table?

    SYSCAT.COLUMNS (the view you are talking about?) also has a column called KEYSEQ ...

    Cheers

    Sathyaram

    Originally posted by rahrens
    Hello,

    I have the name of a view and I have to find out if a field of the view is a primary key.

    More Information:
    I have to redesign a programm that reads the position of the primary keys from a table. For that I read the Field KEYSEQ from SYSIBM.SYSCOLUMNS. But in the new Version I can only use views.

    Does somebody has a solution?

    Thanks,

    Ralf

  3. #3
    Join Date
    Dec 2002
    Posts
    4

    Re: How can I find out if a field of a view the primary key of a table?

    Hi, my keyseq is empty in syscat.columns. May I ask why the situation is? I'd run "Runstats...". Whatelse statement should I call? Thanks.

Posting Permissions

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