Back
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;
Try this code:
ALTER TABLE mytable ALTER COLUMN mycolumn DROP NOT NULL;
Note: Don't specify the type when you're just changing the nullability.
For more information, you can refer to this link:
https://www.postgresql.org/docs/current/sql-altertable.html
30.9k questions
32.9k answers
500 comments
665 users