| Subject | Re: [firebird-support] Alter column not null with constraint name FB3 | 
|---|---|
| Author | livius | 
| Post date | 2018-04-24T18:47:44Z | 
> 
> Hi,name.
> I need to add Field not null constraint with my custom
> in previous versions of Firebird we can do:XXX ADD FIELDX INTEGER CONSTRAINT NK_XXX__FIELDX NOT NULL;
> 1. ALTER TABLE
>>Interestingly, that syntax is not documented in theFirebird 2.5
>>language reference.
it 
has been available for years. And we use it also in table creation
Create 
table A
(
FIELD1 
INTEGER CONSTRAINT NK_A_FIELD1 NOT NULL
)
and 
this syntax is interchangeably between Firebird and Interbase.
There 
is difference in message when null is inserted into not null field.
In 
Interbase there is constraint name in message in Firebird it is not 
included.
In 
Firebird we have “TABLE”.”FieldName” in message.
Will 
be good if Firebird will also contain constraint name.
And 
this is good if user can name all self created constraint in the database like 
it is for all other PK, FK, UK, CK.
You 
can then have in app standardized handling about e.g. error 
messages.
regards,
Karol 
Bieniaszewski