Re: How to reset auto generated id in a DB2 table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Swarbrick

    Re: How to reset auto generated id in a DB2 table

    >>On 6/10/2008 at 4:30 PM, in message
    <ebf88f96-d8b0-4dfc-85ed-a3a5c44ae4dd@i1 8g2000prn.googl egroups.com>,
    <anuritab@gmail .comwrote:
    Hi
    Is there a way to reset the auto generated id for this table. Drop
    table and recreating does not work.
    Seems like that would work, unless you are actually using a SEQUENCE and not
    an IDENTITY column.

    There is also this option, if it's an IDENTITY column:
    ALTER TABLE my_table ALTER COLUMN my_id RESTART WITH 12345;

    I would love to see this done automatically if restoring a table (with
    replace) using the LOAD utility.
    But that's a matter for another day...


Working...