Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Posts
    2

    Exclamation Unanswered: ALTER TABLE: generated always as identity

    DB2 7.1 OS/390

    Is is possible to make a
    SMALLINT NOT NULL
    column to
    SMALLINT NOT NULL generated always as identity
    with ALTER TABLE foo ALTER COLUMN?

    THANKS.

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

    Re: ALTER TABLE: generated always as identity

    NO ....



    Cheers

    Sathyaram

    Originally posted by huangs773
    DB2 7.1 OS/390

    Is is possible to make a
    SMALLINT NOT NULL
    column to
    SMALLINT NOT NULL generated always as identity
    with ALTER TABLE foo ALTER COLUMN?

    THANKS.

  3. #3
    Join Date
    Nov 2003
    Posts
    1

    Smile Re: ALTER TABLE: generated always as identity

    it is not possible to do it with ALTER TABLE foo ALTER COLUMN but you could rename table, create new one (just like you want to) (using DDL) and then copy data back using:
    "INSERT INTO tablename (colnames,...) SELECT colnames, ... FROM tablename_copy"

    Good luck!

    Simon

    Originally posted by huangs773
    DB2 7.1 OS/390

    Is is possible to make a
    SMALLINT NOT NULL
    column to
    SMALLINT NOT NULL generated always as identity
    with ALTER TABLE foo ALTER COLUMN?

    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
  •