Knut Anders Hatlen wrote:
Jakub Jonik <[EMAIL PROTECTED]> 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?

The bug notes indicate it was disabled for db2 compatiblity mode which no longer exists.

Kathey


Reply via email to