title: Alter table primary key column size to 255
body: <p>I have a table with a primary key column size is set to 50. Due to some new requirements, I need to increase the size to 255. After searching online, I understood it is not possible to alter a column if it is a part of a primary key constraint. So, I took the approach of dropping the constraint, altering the column and adding the constraint back.
  But, I am still experiencing a small issue, my original column is of type Non Null and has a default value set, but now when i try the following sql, I get an error "Incorrect syntax near DEFAULT"</p>
  
  <pre><code>ALTER TABLE [tblLocation] 
  DROP CONSTRAINT [PK_tblLocation]
  
  ALTER TABLE [tblLocation] 
  ALTER COLUMN Location VARCHAR(255) DEFAULT('New Location') NOT NULL 
  
  ALTER TABLE [tblLocation]
  ADD
  CONSTRAINT [PK_tblLocation] PRIMARY KEY CLUSTERED
  (
  [Location] ASC
  )
  </code></pre>
  
  <p>Thanks for any help.
  Javid</p>