Add New Column:
ALTER TABLE [dbo].[SampleTable] ADD [NewColum_1] NVARCHAR(MAX) -- will be added as NULLable ALTER TABLE [dbo].[SampleTable] ADD [NewColum_1] NVARCHAR(MAX) NULL ALTER TABLE [dbo].[SampleTable] ADD [NewColum_1] NVARCHAR(MAX) NOT NULL
Add Primary Key:
ALTER TABLE [dbo].[SampleTable] ADD CONSTRAINT PK_Sample_Table PRIMARY KEY CLUSTERED (Id)
Change data type for Primary Key column (IDENTITY setting will be persisted):
-- drop primary key constraint ALTER TABLE [dbo].[SampleTable] DROP CONSTRAINT [PK_SampleTable] GO -- alter column ALTER TABLE [dbo].[SampleTable] ALTER COLUMN [Id] INT NOT NULL -- e.g. changed from SMALLINT to INT -- recreate primary key constraint ALTER TABLE [dbo].[SampleTable] ADD CONSTRAINT [PK_SampleTable] PRIMARY KEY CLUSTERED ( [Id] ASC ) GO