
Answer-first summary for fast verification
Answer: The source table will be dropped, and the target table will remain unaffected.
When a Delta Lake table is created using a `CREATE TABLE AS SELECT` (CTAS) statement, it generates a new table populated with the results of a SELECT query. The new table is independent of the source table used in the query. Therefore, dropping the source table does not affect the target table. Reference: [AS query clause](https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A data engineering team has created a Delta Lake table using the following query: CREATE TABLE target AS SELECT * FROM source. If a data engineer attempts to drop the source table with the command DROP TABLE source, what will be the outcome?
A
An error message will appear, indicating that other tables depend on this source table.
B
Both the target and source tables will be removed from the database.
C
The source table will not be dropped unless the CASCADE keyword is included in the command.
D
The source table will be dropped, but the target table will become unqueryable.
E
The source table will be dropped, and the target table will remain unaffected.