This is a discussion on Re: How to reset auto generated id in a DB2 table within the DB2 forums, part of the Database Server Software category; --> >>> On 6/10/2008 at 4:30 PM, in message <ebf88f96-d8b0-4dfc-85ed-a3a5c44ae4dd@i18g2000prn.googlegroups.com>, <anuritab@gmail.com> wrote: > Hi > Is there a way to ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| >>> On 6/10/2008 at 4:30 PM, in message <ebf88f96-d8b0-4dfc-85ed-a3a5c44ae4dd@i18g2000prn.googlegroups.com>, <anuritab@gmail.com> wrote: > 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... |