Subject | Re: [firebird-support] alter table syntax |
---|---|
Author | Nick Upson |
Post date | 2003-06-27T16:01:13Z |
it's not possible directly using alter table, your options are:
alter table add newcol
update set newcol = oldcol
drop oldcol, etc
there is an update to the system tables, posted by Ibrahim Bulut
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');
DELETE FROM RDB$RELATION_CONSTRAINTS
WHERE
(RDB$CONSTRAINT_TYPE = 'NOT NULL') AND
(RDB$RELATION_NAME = 'TABLE_NAME') AND
(RDB$CONSTRAINT_NAME = 'INTEG_7');
Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile
alter table add newcol
update set newcol = oldcol
drop oldcol, etc
there is an update to the system tables, posted by Ibrahim Bulut
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');
DELETE FROM RDB$RELATION_CONSTRAINTS
WHERE
(RDB$CONSTRAINT_TYPE = 'NOT NULL') AND
(RDB$RELATION_NAME = 'TABLE_NAME') AND
(RDB$CONSTRAINT_NAME = 'INTEG_7');
>From: "skotaylor" <scott@...>_________________________________________________________________
>I'm want to alter a column from 'NOT NULL' to 'NULL', it doesn't need
>to be 'NOT NULL' it's not part of any constraints. I'm having a hard
>time with the syntax, or is it even possible?
Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile