Created
May 30, 2018 13:13
-
-
Save mdamaceno/2ea0a8783d63adee4cc0412ae6408789 to your computer and use it in GitHub Desktop.
Remove NOT NULL from a column in Firebird database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE TABLE_NAME ADD COLUMN_NAME_AUX TYPE; | |
UPDATE TABLE_NAME SET COLUMN_NAME_AUX = COLUMN_NAME; | |
ALTER TABLE TABLE_NAME DROP COLUMN_NAME; | |
ALTER TABLE TABLE_NAME ADD COLUMN_NAME TYPE; | |
UPDATE TABLE_NAME SET COLUMN_NAME = COLUMN_NAME_AUX; | |
ALTER TABLE TABLE_NAME DROP COLUMN_NAME_AUX; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alter table t1 alter column c1 drop not null;