
Explanation:
The correct syntax for creating a new table with a comment in Databricks involves using the COMMENT keyword followed by the comment string enclosed in quotes, placed before the AS SELECT statement. This ensures the comment is properly associated with the table creation. Other options either place the comment incorrectly or use invalid syntax, such as parentheses around the comment.
Ultimate access to all questions.
Which command correctly creates a new table with a comment in Databricks?
A
CREATE TABLE payments COMMENT "This table contains sensitive information" AS SELECT * FROM bank_transactions
B
COMMENT("This table contains sensitive information")CREATE TABLE payments AS SELECT * FROM bank_transactions
C
CREATE TABLE payments AS SELECT * FROM bank_transactions COMMENT "This table contains sensitive information"
D
CREATE TABLE payments AS SELECT * FROM bank_transactions COMMENT("This table contains sensitive information")
E
CREATE TABLE payments COMMENT("This table contains sensitive information") AS SELECT * FROM bank_transactions
No comments yet.