How to change a PG column to NULLABLE TRUE?

SqlPostgresqlNullable

Sql Problem Overview


How can I accomplish this using Postgres? I've tried the code below but it doesn't work:

ALTER TABLE mytable ALTER COLUMN mycolumn BIGINT NULL; 

Sql Solutions


Solution 1 - Sql

From the fine manual:

ALTER TABLE mytable ALTER COLUMN mycolumn DROP NOT NULL;

There's no need to specify the type when you're just changing the nullability.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmateusmasoView Question on Stackoverflow
Solution 1 - Sqlmu is too shortView Answer on Stackoverflow