
Answer-first summary for fast verification
Answer: `SHOW TBLPROPERTIES sales`
In current Databricks SQL, CHECK constraints are stored as table properties. To verify a constraint, use: ```sql SHOW TBLPROPERTIES sales; ``` SHOW CONSTRAINTS is no longer supported, so SHOW TBLPROPERTIES is the correct way to confirm the constraint exists. ✅ Correct Answer: A) SHOW TBLPROPERTIES sales Reference: Databricks Docs – Table Constraints: https://docs.databricks.com/aws/en/tables/constraints#set-a-check-constraint-in-databricks
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
After a data engineer adds a CHECK constraint to the 'sales' table with the command ALTER TABLE sales ADD CONSTRAINT valid_date CHECK (item_date >= ‘2023-01-01‘);, which command should they use to verify the constraint's successful addition?
A
SHOW TBLPROPERTIES sales
B
DESCRIBE TABLE sales
C
DESCRIBE EXTENDED sales
D
SHOW CONSTRAINTS sales
E
SHOW CONSTRAINT valid_date
No comments yet.