But surely you can rename the old table. Create a new table with the old name, adding the identity column and then the rest of the columns from the old table.
Then in a single select statement enter the old data back to the new table. No? > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Monday, September 21, 2009 8:02 AM > To: Derby Discussion > Subject: Re: Add an identity colum > > Hi André, > > Currently, Derby does not let you add an identity column to a table. It > is a disabled feature. There is an outstanding JIRA for re-enabling this > capability: DERBY-3888. I suspect that it is not a lot of work. I am > sure that the community would give you lots of advice if you decided to > tackle this issue yourself. Alternatively, if enough people vote for > this issue, it would percolate to the top of our to-do list. > > Thanks, > -Rick > > André Rothe wrote: > > Hi, > > > > How I can add an identity column to an existing table? > > I have a datatore where I have to alter some tables. It > > seems not possible to alter an existing column (datatype > > integer) into an identity column. Can I add such a > > new column? > > > > Tanks > > Andre > >
