Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
But it gives an error that incorrect syntax at 'as'...what is the correct syntax....??
Any body please help me...



Thanks in advance
Posted
Comments
Thanks7872 10-Nov-14 2:04am    
We can not guess it. For that, you have to show us the code. Use improve question link at bottom of your question and post relevant code.

To change the primary key definition for a table you need to use ALTER TABLE : http://www.w3schools.com/sql/sql_primarykey.asp[^]
 
Share this answer
 
SQL UPDATE command is a DML (Data Manipulation Language) command and use to change data and not table structure...
You have to run a DDL (Data Definition Language) command - ALTER TABLE - to add primary key...
http://www.w3schools.com/sql/sql_primarykey.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900