Changing NOT NULL for an existing column

To change the NOT NULL constraint on an existing column use the
following SQL.  To allow null you must use "= NULL", to disallow
null you must use "= 1".

update
  RDB$RELATION_FIELDS
set
  RDB$NULL_FLAG = *** HERE ***
where
  (RDB$FIELD_NAME = 'COLUMNNAME')
  and (RDB$RELATION_NAME = 'TABLENAME');

 

Share this article!

Follow us!

Find more helpful articles: