Click here to Skip to main content
15,116,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Gud mng
I am using the MySql5.1 database.My doubt is can i assign unique constraint to the particular column in a table which is already having a column as primary key.Waiting for the reply.
Thank you.
Posted

1 solution

Yes you should be able to - see MySql documentation[^] for a neat little sample.
   
Comments
komali Guntur 14-Jul-11 3:25am
   
Thank You Abhinav
But i am using the MYISAM engine and i am assigning the unique constraint to the column.When i have done like that the data is not importing into the table if i assign the column as unique and there are no duplicates also.

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