Subject | Re: [firebird-support] Alter column not null with constraint name FB3 |
---|---|
Author | Mark Rotteveel |
Post date | 2018-04-24T13:40:43Z |
On 24-4-2018 09:34, liviuslivius liviuslivius@...
[firebird-support] wrote:
language reference.
Internally, a `not null`-constraint is just a check constraint.
Mark
--
Mark Rotteveel
[firebird-support] wrote:
>Interestingly, that syntax is not documented in the Firebird 2.5
>
> Hi,
> I need to add Field not null constraint with my custom name.
> in previous versions of Firebird we can do:
> 1. ALTER TABLE XXX ADD FIELDX INTEGER CONSTRAINT NK_XXX__FIELDX NOT NULL;
language reference.
> 2. UPDATE TABLE XXX SET FIELDX=some calculations;It is prohibited, unless you apply a default.
> Now in Firebird 3 this is prohibited on table with data.
> Then i do this on FB3.alter table xxx add constraint NK_XXX__FIELDX check (fieldx is NOT NULL)
> 1. ALTER TABLE XXX ADD FIELDX INTEGER;
> 2. UPDATE TABLE XXX SET FIELDX=some calculations;
> 3. Add not null - how? I see only ALTER TABLE XXX ALTER FIELDX SET NOT
> NULL; there are not place for constraint name
> i need to add Field not null constraint with my custom name.
Internally, a `not null`-constraint is just a check constraint.
Mark
--
Mark Rotteveel