SnowPro Core Certification — Question 558
Which operation will produce an error in Snowflake?
Answer options
- 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
Correct answer: B
Explanation
The correct answer is B because inserting a NULL into a NOT NULL constrained column violates the constraint and results in an error. Options A and C are incorrect as Snowflake allows duplicates in UNIQUE columns unless specified otherwise. Option D is also incorrect since Snowflake allows the insertion of values that do not match the referenced FOREIGN KEY value, provided other integrity constraints are maintained.