Alter Column

  • Is there a way of altering a columns default value without having to drop and recreate indexes on field??

  • This should not cause an index drop and rebuild need.

     

    ALTER TABLE dbo.tblName

     DROP CONSTRAINT Default_name

    GO

    ALTER TABLE dbo.tblName ADD CONSTRAINT

     Default_name DEFAULT ('ValueHere') FOR ColumnName

    GO

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply