
Answer-first summary for fast verification
Answer: CTAS commands derive the schema from the query results, eliminating the need for explicit column specifications.
The correct answer highlights that CTAS (CREATE TABLE AS SELECT) commands dynamically infer the schema of the new table from the results of the SELECT query, removing the necessity for explicit column definitions. This approach ensures the schema is accurately derived from the data, offering flexibility and reducing manual schema definition errors. Key points include the automatic schema inference and the elimination of the need for explicit column specifications, making CTAS a powerful tool for data engineers.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
When a data engineer uses the CTAS (CREATE TABLE AS SELECT) command to create a new table called employees_per_department based on a query, which of the following statements accurately describes the schema handling?
A
CTAS commands require you to manually specify the schema details for the new table.
B
CTAS commands automatically infer the schema by scanning the data in the source table.
C
CTAS commands derive the schema from the query results, eliminating the need for explicit column specifications.
D
CTAS commands default all columns to the STRING data type unless specified otherwise.
E
CTAS commands do not support schemas, resulting in tables without defined columns.
No comments yet.