I tried to update column's default value with the below queries in postgres. But seems its not working. May be I am missing something. Could you help?
ALTER TABLE tableName ADD COLUMN newColumn INTEGER DEFAULT 0;
ALTER TABLE tableName ALTER COLUMN newColumn DROP DEFAULT;
or
ALTER TABLE tableName ALTER COLUMN newColumn SET DEFAULT NULL;
SELECT * FROM tableName;
Here I still find 0.