
Answer-first summary for fast verification
Answer: The suppliers table now contains both the data it had before the command was run and the data from the new_suppliers table, including any duplicate data.
The command `INSERT INTO stakeholders.suppliers TABLE stakeholders.new_suppliers;` uses the TABLE clause syntax, which is valid in Databricks SQL for inserting all rows from one table into another. According to the Databricks documentation and community consensus (with multiple comments citing official docs and providing working examples), this syntax correctly appends all data from the new_suppliers table to the existing suppliers table. Since this is a standard INSERT operation without any deduplication clause (like DISTINCT), duplicate rows are preserved. Option A is incorrect because duplicates are not deleted. Option B is wrong as the syntax is valid. Option D is incorrect because data is appended, not swapped. Option E is wrong because existing data in suppliers is retained, not replaced.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A data analyst executes the following command:
INSERT INTO stakeholders.suppliers TABLE stakeholders.new_suppliers;
INSERT INTO stakeholders.suppliers TABLE stakeholders.new_suppliers;
What is the result of this command?
A
The suppliers table now contains both the data it had before the command was run and the data from the new_suppliers table, and any duplicate data is deleted.
B
The command fails because it is written incorrectly.
C
The suppliers table now contains both the data it had before the command was run and the data from the new_suppliers table, including any duplicate data.
D
The suppliers table now contains the data from the new_suppliers table, and the new_suppliers table now contains the data from the suppliers table.
E
The suppliers table now contains only the data from the new_suppliers table.