mercredi 30 septembre 2015

Default column value during and after adding a column

If I specify a default when adding a non-null column to a table ...

ALTER TABLE foo
ADD COLUMN bar INT DEFAULT 42 NOT NULL

... does the bar column continue to have a default value, or is the default only used while adding the column?

Aucun commentaire:

Enregistrer un commentaire