How to make Primary Key in Sql Server Using Alter Statement? -


I have forgotten that create a primary key for my table. Now I update the DocDay_Id column I want to make it and make it a primary key. How can I do this?

My code is below.

I tried this syntax but it is not correct.

  Optional table Doctoral Optional column DocDay_Id int IDENTITY (1,1) Primary key faucet table form doctor's device (DocDay_Id int IDENTITY (1,1) No, zero, Doc_Id int Foreign Key Reference Doctor (Doc_Id ) No, zero, day_directory difference foreign key reference day (Day_Id) not zero)    

To create a clustered primary key on an existing table: Optional Table Doctorus Insert Do Pike_ DocDays primary key class (DocDay_Id);

To create a non-clustered primary key on an existing table:

  Insert an optional table doctor's PK_DocDays primary key denied (DocDay_Id);        

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -