How to change a PG column to NULLABLE TRUE?

后端 未结 1 1273
南旧
南旧 2020-12-23 08:32

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; 

1条回答
  •  隐瞒了意图╮
    2020-12-23 08:44

    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.

    0 讨论(0)
提交回复
热议问题