Skip to content

Adding new column via ALTER TABLE should assign default value (not just to new NOT NULL columns) [CORE4525] #4843

Open
@firebird-automations

Description

@firebird-automations

Submitted by: Nick (nick)

Votes: 1

create table T (Id integer);
insert into T (Id) values (1);
insert into T (Id) values (2);
alter table T add field F1 integer default 1 not null;
select F1 from T
--
1
1

alter table T add field F2 integer default 1;
select F2 from T
--
null
null

snapshot 31273

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions