Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Posts
    7

    Unanswered: How to determine if column is auto id

    Hi Everyone,
    How do I determine if a column was created as

    INTEGER GENERATED ALWAYS AS IDENTITY NOT NULL?

    I tried describe table with show detail but do not see anything indicating generated or identity in the output.

    Seems like there must be a way.

    Thanks.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Look in the SYSCAT.COLUMNS catalog view.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Sep 2008
    Posts
    7
    Thanks very much for your response.

    Thanks.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can also do a db2look.

    db2look -d db-name -t table-name -e
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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