Subject | Re: alter table syntax |
---|---|
Author | skotaylor |
Post date | 2003-06-27T16:48:01Z |
--- In firebird-support@yahoogroups.com, "Nick Upson" <uebridger@h...>
wrote:
able to trace down the reference. :)
How do I trace that reference to the right field name? (there are 3
other fields on that table that do need the 'NOT NULL' contraint)
I'm digging, but haven't been able to find where 'INTEG_x' is linked
to the right field name.
Thanks for not top posting.
Scott.
wrote:
> it's not possible directly using alter table, your options are:That's not an option as it would destroy the data I want to keep.
>
> alter table add newcol
> update set newcol = oldcol
> drop oldcol, etc
> there is an update to the system tables, posted by Ibrahim BulutThis is pretty much what I ended up with too. Thanks to WISQL I was
>
> NOT NULL FIELD ==> NULLABLE FIELD
> ================================
> UPDATE RDB$RELATION_FIELDS
> SET
> RDB$NULL_FLAG=NULL
> WHERE
> (RDB$FIELD_NAME = 'FIELD_NAME') AND
> (RDB$RELATION_NAME='TABLE_NAME');
able to trace down the reference. :)
> DELETE FROM RDB$RELATION_CONSTRAINTSThis could be dangerous, 'INTEG_7' may not be the right reference.
> WHERE
> (RDB$CONSTRAINT_TYPE = 'NOT NULL') AND
> (RDB$RELATION_NAME = 'TABLE_NAME') AND
> (RDB$CONSTRAINT_NAME = 'INTEG_7');
How do I trace that reference to the right field name? (there are 3
other fields on that table that do need the 'NOT NULL' contraint)
I'm digging, but haven't been able to find where 'INTEG_x' is linked
to the right field name.
Thanks for not top posting.
Scott.