
Answer-first summary for fast verification
Answer: Inserting a NULL into a column with a NOT NULL constraint
In Snowflake, constraints like PRIMARY KEY, UNIQUE, and FOREIGN KEY are informational only and are not enforced by the system. However, NOT NULL constraints are always enforced. Therefore, inserting a NULL value into a column with a NOT NULL constraint (option B) will result in an error. The other options (A, C, D) involve constraints that Snowflake does not enforce, so they would not produce errors. The community discussion, with upvoted comments and a 100% consensus on B, confirms this understanding.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Which of the following operations will result in an error in Snowflake?
A
Inserting duplicate values into a PRIMARY KEY column
B
Inserting a NULL into a column with a NOT NULL constraint
C
Inserting duplicate values into a column with a UNIQUE constraint
D
Inserting a value to FOREIGN KEY column that does not match a value in the column referenced
No comments yet.