Hi Mark,

I find that this fails for me too when using the 10.2 series of releases. However, the experiment succeeds when I use the 10.3 and 10.4 releases.

Regards,
-Rick

Mark P Ashworth wrote:
Good Day,

Derby version: 10.2.2.0

As part of the database data upgrade process I need to do the following so
that the existing rows get a NULL for the column but all new rows will get
the default of the current timestamp.

CREATE TABLE X (
 FIELD INT
)

ALTER TABLE X ADD COLUMN FIELD_DATE TIMESTAMP

ALTER TABLE X ALTER FIELD_DATE DEFAULT CURRENT_TIMESTAMP

Regards,
Mark P Ashworth

Reply via email to