How can I ALTER COLUMN to NULL when the column in NOT NULL in Oracle

132 Views Asked by At

How can I ALTER COLUMN to NULL when the column in NOT NULL in Oracle, with a sentence or script?

1

There are 1 best solutions below

1
On

To alter the column (assuming the current type is varchar2(100)):

alter table mytable modify column1 varchar2(100) null

Interestingly, this fails if the column is already nullable.