How to change PG column to NULLABLE TRUE?

How can I do this using Postgres? I tried the code below, but it does not work:

ALTER TABLE mytable ALTER COLUMN mycolumn BIGINT NULL; 
+61
sql nullable postgresql
Jan 27 '11 at 5:05
source share
2 answers

From the exact guide :

 ALTER TABLE mytable ALTER COLUMN mycolumn DROP NOT NULL; 

There is no need to specify a type when you just change the nullability value.

+141
Jan 27 '11 at 5:30
source share

For Oracle users:

 alter table mytable modify(mycolumn null); 
-3
May 21 '13 at 7:56
source share



All Articles