Subject | RE: [firebird-support] Detecting default values |
---|---|
Author | Leyne, Sean |
Post date | 2011-11-03T20:39:08Z |
Ismael,
Sean
> In the trigger:This will not be able to distinguish the condition:
>
> if (new.myfield is null) then
> But now, i'm facing a new challenge: how to detect if the null status IDoug Chamberlin's solution is the right one, though with a possible problem if the full range of values for the field are valid within an INSERT statement (in which case no "dummy" default value could be defined).
> received in new.myfield is because the field was not in the insert
> statement or because the insert statement set it to null ?
>
> well, from
> insert into mytable (field1) values (:field1)
> or from
> insert into mytable (field1, myfield) values (:field1, null)
Sean