add ANOTHER primary key to a table which is UNIQUE
- by gdubs
so im having problems with adding another primary key to my table.
i have 3 columns:
1. Account ID (Identity)
2. EmailID
3. Data field
when i made the table i had this to make the Account ID and the Email ID unique
PRIMARY KEY (AccountID, EmailID)
i thought that would make my emailid unique, but then after i tried inserting another row with the same emailid it went through.
so i thought i missed something out.
now for my question:
IF, i had to use alter, How do i alter the table/PK Constraint to modify the EmailID field and make it Unique
IF i decided to drop the table and made a new one, how do i make those two primary keys uniqe?
Thanks a bunch!!