Saturday, December 8, 2012

Add Primary Key Constraint to Existing table in sql server


Add Primary Key Constraint to Existing table in sql server 

Syntax:
              alter table [table] add constraint [constraint name] primary key(columns)


for ex:  alter table tb add constraint PK_const_ primary key(ID).
 Here table called tb adding primary key constraint name PK_const_  for ID column













Tags:How to Add Primary key  in sql server 2012, How to add primary key to existing table in sql server,
How to add primary key constraint in sql server,How to add primary key constraint to existing table in sql server,

No comments:

Post a Comment