Subject | Re: [ib-support] Fw: NOT NULL question |
---|---|
Author | Helen Borrie |
Post date | 2001-12-18T07:41:27Z |
At 07:32 AM 18-12-01 +0100, Nico wrote:
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
>Hi list,ALTER TABLE ADD CONSTRAINT MyColNotNull
>
> Is there a way to add a NOT NULL constraint to a column, with ALTER TABLE ? (Interbase 6).
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