QuestionQ3

Executing queries using Databricks SQL and Databricks SQL Warehouses

A data analyst executes the following command:

INSERT INTO stakeholders.suppliers TABLE stakeholders.new_suppliers;  

What happens when this command is executed?

  • 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.
Explanation

GoogleSQL INSERT statements require the inserted input to be VALUES data or a SELECT query. TABLE stakeholders.new_suppliers is not a valid input in this INSERT syntax, so the statement returns a syntax error and no table data is changed.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!