October 18, 2012 at 10:40 am
Hi, I have a table that includes columns
Firstname, lastname and Birthdate. How do I add a unique constraint on these three fields?
Thanks!!
October 18, 2012 at 10:44 am
ALTER TABLE SomeTable ADD CONSTRAINT UQ_Firstname_lastname_Birthdate UNIQUE (Firstname,lastname,Birthdate)
Lowell
October 18, 2012 at 10:47 am
So people with the same name never share a birthday?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 18, 2012 at 10:51 am
Yes, that is correct.
October 18, 2012 at 11:04 am
Thanks!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply