How to remove the DEFAULT value of a table column in PostgreSQL

Execute the following command

ALTER TABLE your_table ALTER COLUMN your_column DROP DEFAULT;

Replace your_table with the table and your_column with the column name where you wish to remove the default value

The above command is the same as setting the DEFAULT to NULL

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.