Which of the following is a difference between a primary key and a unique key?
A.
A unique key cannot take null values, whereas a primary key can take null values.
B.
There can be only one primary key in a data set, whereas there can be multiple unique keys.
C.
A primary key can take a value more than once, whereas a unique key cannot take a value more than once.
D.
A primary key cannot be a date variable, whereas a unique key can be.
The Answer Is:
B
This question includes an explanation.
Explanation:
The correct answer is B. There can be only one primary key in a data set, whereas there can be multiple unique keys.
A primary key is a column or a set of columns that uniquely identifies each row in a table. A table can have only one primary key, which also enforces the NOT NULL constraint on the column(s) involved.A primary key can also be referenced by a foreign key of another table to establish a relationship between the tables12
A unique key is a column or a set of columns that also uniquely identifies each row in a table, but it is not the primary key. A table can have more than one unique key, which also allows one NULL value for the column(s) involved.A unique key can also be referenced by a foreign key of another table to establish a relationship between the tables12
Some of the differences between a primary key and a unique key are:
A primary key creates a clustered index on the column(s), whereas a unique key creates a non-clustered index on the column(s)3
A primary key does not allow any NULL values, whereas a unique key allows one NULL value for the column(s)123
A primary key can be a unique key, but a unique key cannot be a primary key12
DA0-001 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 75% Discount on All Products,
Use Coupon: "ac75sure"