
Answer-first summary for fast verification
Answer: DESCRIBE EXTENDED dev.pii_test
The correct answer is A. DESCRIBE EXTENDED provides comprehensive metadata about the table, including column comments (e.g., 'name' with comment), the table comment ('Contains PII'), and all table properties (including custom ones like 'contains pii'). Other options fall short: B (DESCRIBE DETAIL) shows technical details but not comments/properties; C (SHOW TBLPROPERTIES) only lists table properties, missing column/table comments; D (DESCRIBE HISTORY) shows transaction history; E (SHOW TABLES) merely lists tables. Only A validates all three requirements.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Which SQL command can be used to manually verify that all three PII annotation requirements (column comments, table comments, and the 'contains_pii' table property set to true) have been properly implemented for the dev.pii_test table?
CREATE TABLE dev.pii_test
(id INT, name STRING COMMENT "PII")
COMMENT "Contains PII"
TBLPROPERTIES ('contains_pii' = true)
CREATE TABLE dev.pii_test
(id INT, name STRING COMMENT "PII")
COMMENT "Contains PII"
TBLPROPERTIES ('contains_pii' = true)
A
DESCRIBE EXTENDED dev.pii_test
B
DESCRIBE DETAIL dev.pii_test
C
SHOW TBLPROPERTIES dev.pii_test
D
DESCRIBE HISTORY dev.pii_test
E
SHOW TABLES dev
No comments yet.