Reputation: 41
How to make a NULLable column (varchar2(20)) to NOT NULL of a table in oracle where I have more than 1 million records in the table
Upvotes: 4
Views: 16537
Reputation: 49062
NOT NULL constraint specifies that a column cannot contain NULL values. To add a NOT NULL constraint to an existing table by using the ALTER TABLE statement.
ALTER TABLE table_name MODIFY ( column_name NOT NULL);
In this case, the column_name must not contain any NULL value before applying the NOT NULL constraint.
Upvotes: 9