Databricks Certified Data Engineer Professional · Free Practice Question Medium
Question 9
A data engineer has added a CHECK constraint to the sales table using the following command:
- ALTER TABLE sales ADD CONSTRAINT valid_date CHECK (item_date >= '2024-01-01');
In addition, they have added a comment on the item_date column using the following command:
- ALTER TABLE sales ALTER COLUMN item_date COMMENT "Date must be newer than Jan 1, 2024";
Which of the following commands allows the data engineer to verify that both the constraint and the column comment have been successfully added on the table ?
-
A
SHOW TBLPROPERTIES sales
-
B
DESCRIBE TABLE sales
-
C
DESCRIBE DETAIL sales
-
D
DESCRIBE EXTENDED sales
-
E
SHOW TABLES sales
Reveal correct answer
Correct answer: D
Explanation
DESCRIBE TABLE EXTENDED or simply DESCRIBE EXTENDED allows to show the added tables constraints in the ‘Table Properties’ field. It shows both the name and the actual condition of the check constraints.
In addition, DESCRIBE EXTENDED allows to show the comments on each column, and the comment on the table itself.

Reference:
https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-describe-table.html
https://docs.databricks.com/tables/constraints.html#set-a-check-constraint-in-databricks
Study materials from our exam preparation course on Udemy:
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
