Subject | Re: [firebird-support] Re: Avoiding Null value and having basic default values |
---|---|
Author | Martijn Tonies |
Post date | 2004-06-16T10:49:40Z |
Hi,
the column in the INSERT INTO clause.
So, if it does get inserted, but with a value of NULL, then
the only thing you can do is writing triggers.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> >2) you can easily change the behaviour in a BEFORE INSERT or UPDATEWell, a DEFAULT clause is only honored if you don't specify
> >trigger:
> >
> >if (new.mycolumn is null) then new.mycolumn = 0;
>
> That would be tedious, specifying each and every one of the fields. Any
> one stop shop <g>. I need each and every one initialized to it's
> characteristic default value.
the column in the INSERT INTO clause.
So, if it does get inserted, but with a value of NULL, then
the only thing you can do is writing triggers.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com