Question 1 What will happen if you try to use the INSERT command to insert a NUL
ID: 3594645 • Letter: Q
Question
Question 1
What will happen if you try to use the INSERT command to insert a NULL value into a column that has been assigned a PRIMARY KEY constraint?
The command will execute because only a UNIQUE constraint forbids NULL values.
An error message is returned and the row is not added to the table.
An error message is returned but the unaffected portion of the row is added to the table.
The command will execute because a PRIMARY KEY value can be NULL.
a.The command will execute because only a UNIQUE constraint forbids NULL values.
b.An error message is returned and the row is not added to the table.
c.An error message is returned but the unaffected portion of the row is added to the table.
d.The command will execute because a PRIMARY KEY value can be NULL.
Explanation / Answer
Answeer: b. An error message is returned and the row is not added to the table.
PRIMARY KEY constraint means Not Null + Unique. It will nt allow nul values and should be unique values in the column. So it will thrown an error message.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.