title: Get the value from a default constraint
body: <p>I need to change a default constraint value from 0 to 1. This is done easy with:</p>
  
  <pre><code>ALTER TABLE table DROP CONSTRAINT X
  ALTER TABLE table ADD CONSTRAINT X default (1) for table.column
  </code></pre>
  
  <p>The problem is that I don't want to drop and create a new constraint every time I run modelupdate on my database. That's why I want to run this code <em>IF</em> the value of the constraint is 0. </p>
  
  <p>Is it possible to check the value of a default constraint in SQL, if yes, how?</p>