0

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"

  • 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, '' '0', but there are lot of null values in the table, but not able to retrieve the same. – Srikanth Bejjenky May 12 '20 at 15:15
  • `where column is null` or maybe `where column is null or column = ''` –  May 12 '20 at 15:16

0 Answers0