Problem:
An already existing table (sat table_name) has a column (say column_name) with data type (data_type) defined as NOT NULL. You want to change this column to a Null field.
Solution:
Try either this command:
ALTER TABLE table_name MODIFY column_name data_type NULL;
e.g. ALTER TABLE MyTable MODIFY FirstName VARCHAR2(60) NULL;
or this command:
ALTER TABLE table_name ALTER COLUMN column_name data_type NULL;
eg. ALTER TABLE MyTable ALTER COLUMN FirstName VARCHAR2(60) NULL;
To change from a Null column to Not Null, use the following command:
ALTER TABLE table_name MODIFY column_name data_type NOT NULL;
or
ALTER TABLE table_name ALTER COLUMN column_name data_type NOT NULL;
Hope that helps you. Enjoy Don’t hesitate to ask questions.