ALTER TABLE [dbo].[TableName]
Drop CONSTRAINT PrimaryKeyConstraintName
--change data type
ALTER TABLE [dbo].[TableName]
ALTER COLUMN ColumnName BigInt
--add primary key
ALTER TABLE [dbo].[TableName]
ADD CONSTRAINT PrimaryKeyConstraintName PRIMARY KEY (ColumnName)
Drop CONSTRAINT PrimaryKeyConstraintName
--change data type
ALTER TABLE [dbo].[TableName]
ALTER COLUMN ColumnName BigInt
--add primary key
ALTER TABLE [dbo].[TableName]
ADD CONSTRAINT PrimaryKeyConstraintName PRIMARY KEY (ColumnName)