Can a unique constraint be a combination of fields that uniquely defines a record?

Options
- Yes
- No


CORRECT ANSWER : Yes

Discussion Board
Unique constraint

Yes, a unique constraint can be a combination of fields that uniquely defines a record. A unique constraint is a single field or combination of fields that uniquely defines a record. Some of the fields can contain null values as long as the combination of values is unique.

Prajakta Pandit 02-15-2017 04:06 AM

Can a unique constraint be a combination of fields that uniquely defines a record?

This is valid SQL:
alter table "CANDIDATE" add constraint
"CANDIDATE_U1" unique ("CANDIDATE_NAME","REQUIRES_SCHOLARSHIP_YN","SCORE")
/

Michael 09-17-2015 10:39 PM

Not able to understand

How it is combination of fields. i think it should be one field. Please provide the correct explanation.

venkatesh 05-26-2014 11:23 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement