db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Identity column
Date Fri, 17 Aug 2007 14:23:57 GMT
Jakub Jonik <kubjon@gmail.com> writes:

> I am trying to add an Identity column to an existing table with the
> following SQL:
> ALTER TABLE DummyTable ADD COLUMN DummyColumn GENERATED BY DEFAULT AS
> IDENTITY START WITH 1, INCREMENT BY 1.
>
> And I am getting the error:
> SQL state 42601: ALTER TABLE statement cannot add an IDENTITY column to a table.
>
> Is there any way to work around this?

There is actually code for it (for instance in
AlterTableConstantAction.updateNewAutoincrementColumn()), but it is
disabled in the parser with a reference to bug 5724. Does anyone have
any details on why it is disabled?

-- 
Knut Anders

Mime
View raw message