Skip to navigation
How to add a primary key to a mssql column
20.01.17
ALTER TABLE [SL].[dbo].[zz_styles] ADD PRIMARY KEY (av0_style) in case it has a null datatype: UPDATE [SL].[dbo].[zz_styles] SET [av0_style]=0 WHERE [av0_style] IS NULL ALTER TABLE [SL].[dbo].[zz_styles] ALTER COLUMN [av0_style] INTEGER NOT NULL ALTER TABLE [SL].[dbo].[zz_styles] ADD PRIMARY KEY (av0_style)
http://www.w3schools.com/sql/sql_primarykey.asp
Reply
Anonymous
Information Epoch 1732634430
Allow the user to tailor the environment.
Home
Notebook
Contact us