title: How to change the default value of a column in SQL Server
body: <p>Supposedly I have a table called Person defined like this:</p>
  
  <pre><code>CREATE TABLE Persons
  (
      P_Id uniqueidentifier Default newsequentialid() NOT NULL,
      LastName varchar(255) NOT NULL,
      FirstName varchar(255),
      Address varchar(255),
      City varchar(255) DEFAULT 'Sandnes'
  )
  </code></pre>
  
  <p>How can I remove the default value for that column using an sql query? Furthermore how can I add it if it is not present to begin with.
  I know it is possible to add it via altering the table and adding a constraint over the P_Id column but I am not sure if that is the only way. I have come across <a href="http://www.w3schools.com/sql/sql_default.asp" rel="nofollow">this article</a> however what is suggested there doesn't seem to really work.</p>
  
  <p>Any ideas? </p>