41.7k views
5 votes
Which option, when placed in the blank space, ensures that the BookISBN column will not contain any duplicate values?

a) UNIQUE
b) CONSTRAINT UNIQUE
c) UNIQUE KEY
d) CONSTRAINT BookISBN_UNIQUE

1 Answer

2 votes

Final answer:

To prevent duplicates in the BookISBN column, the correct option is 'c) UNIQUE KEY', although 'd) CONSTRAINT BookISBN_UNIQUE' is also a valid approach if naming the constraint is desired.

Step-by-step explanation:

To ensure that the BookISBN column will not contain any duplicate values, you can use a UNIQUE constraint. The correct option to place in the blank space is c) UNIQUE KEY, which enforces the uniqueness of the entries in that column. However, option d) CONSTRAINT BookISBN_UNIQUE is also a valid approach when you want to name the constraint for clarity, it would be defined in the SQL statement as follows:

CONSTRAINT BookISBN_UNIQUE UNIQUE

Both options will effectively prevent duplicate values in the BookISBN column.

User Lunette
by
8.7k points