How to change a PG column to NULLABLE TRUE?

最后都变了- 提交于 2019-11-30 10:26:51

问题


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:


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.



来源:https://stackoverflow.com/questions/4812933/how-to-change-a-pg-column-to-nullable-true

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!