title: Adding Default Constraints to table in PostgreSQL
body: <p>I am working with PostgreSQL database.  I have created the required tables. Now I have to alter table columns as per constraints. I have to apply default constraint to one of my columns whose default value should be 1.</p>
  
  <p>This is the query I am using,</p>
  
  <pre><code>ALTER TABLE Alerts ADD  CONSTRAINT DF_Alerts_bIsActive SET DEFAULT ((1)) FOR bIsActive;
  </code></pre>
  
  <p>This is the error I am Getting,</p>
  
  <pre><code>ERROR:  syntax error at or near "SET"
  LINE 30: ... TABLE Alerts ADD  CONSTRAINT DF_Alerts_bIsActive SET DEFAUL...
                                                                ^
  SQL state: 42601
  Character: 948
  </code></pre>
  
  <p>Please can anyone suggest me the proper way to achieve this.</p>