DRAG DROP
You create a table that contains the following script:
You need to prevent duplicate values in the EmployeeID field.
Which five code segments should you use?
To answer, move the appropriate code segments from the list of code segments to the
answer area and arrange them in the correct order.
Correct answer:
ALTER TABLE dbo.Customers
ADD CONSTRAINT
CK_EmployeeID
UNIQUE
(EmployeeID)
Exactly correct
ALter table cust. add cons. unique(colm nm)
You should give your constraint a name.
http://stackoverflow.com/questions/1397440/what-is-the-purpose-of-constraint-naming
Correct answer:
ALTER TABLE dbo.Customers
ADD CONSTRAINT
CK_EmployeeID
UNIQUE
(EmployeeID)
I agree