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

77 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 answers

1
Bohemian 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.