全部博文(69)
分类: SQLServer
2014-08-23 08:39:58
--- add a new column with desired datatype
alter table dbo.Quotes
add StatusID2 smallint
go
-- copy values from old column to new column
UPDATE dbo.Quotes SET StatusID2 = StatusID
go
-- drop old column
alter table dbo.Quotes
drop column StatusID
go
-- drop check constraint
alter table dbo.Quotes
drop constraint ck_quote
go