Subject | Re: [ib-support] Fw: NOT NULL question |
---|---|
Author | Nico Callewaert |
Post date | 2001-12-18T07:56:08Z |
Thanks for the answer,
Nico
Nico
----- Original Message -----
From: "Martijn Tonies" <martijn@...>
To: <ib-support@yahoogroups.com>
Sent: Tuesday, December 18, 2001 8:48 AM
Subject: RE: [ib-support] Fw: NOT NULL question
> Hi Helen,
>
> One thing though, this constraint will show up as a CHECK CONSTRAINT and
> will not show as a 'NOT NULL' field in the tools :)
>
> It does work though :)
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase and Firebird
> http://www.interbaseworkbench.com
>
>
>
> At 07:32 AM 18-12-01 +0100, Nico wrote:
> >Hi list,
> >
> > Is there a way to add a NOT NULL constraint to a column, with
ALTER
> TABLE ? (Interbase 6).
>
> ALTER TABLE ADD CONSTRAINT MyColNotNull
> CHECK (MyCol is not null);
>
> I'd want to add a trigger to write a default value as well....and I'm not
> sure whether Prepare marks columns thus constrained as Required Fields in
> Delphi.
>
> If the table doesn't have any dependencies, an alternative would be to
> create a duplicate table with NOT NULL on that column and pump the data
> across, drop the original table, then duplicate the new table the same
way.
>
> Don't forget to go through and find existing nulls first!
>
> cheers,
> Helen
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>