A data analyst runs the following command:
INSERT INTO stakeholders.suppliers TABLE stakeholders.new_suppliers;
What is the result of running this command?
INSERT { OVERWRITE | INTO } [ TABLE ] table_name [ PARTITION clause ] [ ( column_name [, ...] ) | BY NAME ] query
INSERT INTO [ TABLE ] table_name REPLACE WHERE predicate query
The command in the question is missing theOVERWRITEorINTOkeyword, and thequerypart that specifies the source of the data to be inserted. TheTABLEkeyword is optional and can be omitted. ThePARTITIONclause and the column list are also optional and depend on the table schema and the data source. Therefore, the command in the question will fail with a syntax error.
INSERT - Azure Databricks - Databricks SQL | Microsoft Learn
Currently there are no comments in this discussion, be the first to comment!