How do I add a default value to a text column in postgres table,example "There is no message" tried the below: alter table messages alter column message set default ="There is no message"
Asked
Active
Viewed 3,737 times
0
-
Does this answer your question? [How do I change column default value in PostgreSQL?](https://stackoverflow.com/questions/4745156/how-do-i-change-column-default-value-in-postgresql) – c_sagan May 11 '20 at 18:10
-
Thanks for the link , it helped. one more question am trying to retrieve a column's null values in postgres sql but not able to do so: the values in the column are
, I tried where column='null', '', is null, ' – Srikanth Bejjenky May 12 '20 at 15:15' '0', but there are lot of null values in the table, but not able to retrieve the same. -
`where column is null` or maybe `where column is null or column = ''` – May 12 '20 at 15:16