How can I ALTER COLUMN
to NULL when the column in NOT NULL in Oracle, with a sentence or script?
Asked
Active
Viewed 67 times
-1

rink.attendant.6
- 44,500
- 61
- 101
- 156

Yalmar Chavarría
- 1
- 2
-
sorry, te correct are: "How can I ALTER COLUMN to NULL when the column IS NOT NULL in Oracle [...]" – Yalmar Chavarría Jun 10 '15 at 19:20
-
I solved using "Alter table mytable modify column1 VARCHAR2(15) null;" – Yalmar Chavarría Jun 10 '15 at 20:57
1 Answers
1
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.

Bohemian
- 412,405
- 93
- 575
- 722
-
I solved using "Alter table mytable modify column1 VARCHAR2(15) null;" – Yalmar Chavarría Jun 10 '15 at 20:55