Saturday, 5 January 2013

SQL TABLE ALTER SCRIPT

SQL TABLE ALTER SCRIPT

Following script is used to alter sql table with default value.

-- Adding Value with Default ValueALTER TABLE TableNameADD ColumnName INT NOT NULL DEFAULT(0)GO

Script alter Column type

ALTER TABLE mytable ALTER COLUMN mycolumn newtype

No comments:

Post a Comment