Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    10

    Unanswered: Restart numbering for identity column

    hi I have identity column with data type integer starting from 1 and incrementing every insertion.

    for sometime i wanna run a stored procedure which restart the identity numbering to 1, how can i do that?
    I try this statement, but couldn't run it:
    alter table <table-name> alter column <identity-column-name> restart with 1;

    Thanks in advance

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    What version of db2 are you using ??? what platform ???? any associated error message?????

    Read the thread 'Must read before posting'

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2005
    Posts
    191
    I suggest you read the SQL Reference manual for your version of DB2. Some versions don't allow alteration of an identity column; some do but with different syntax from that which you are using.

    James Campbell

Posting Permissions

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