
Ultimate access to all questions.
A data engineer has been given a new record of data:
id STRING = 'a1'
rank INTEGER = 6 rating FLOAT = 9.4
id STRING = 'a1'
rank INTEGER = 6 rating FLOAT = 9.4
Which of the following SQL commands can be used to append the new record to an existing Delta table my_table?
A
INSERT INTO my_table VALUES ('a1', 6, 9.4)
B
my_table UNION VALUES ('a1', 6, 9.4)
C
INSERT VALUES ('a1', 6, 9.4) INTO my_table
D
UPDATE my_table VALUES ('a1', 6, 9.4)
E
UPDATE VALUES ('a1', 6, 9.4) my_table
Explanation:
Correct Answer: A
Why Option A is correct:
INSERT INTO table_name VALUES (...) is the standard SQL syntax for inserting new records into a table.my_table) and provides the values in the correct order matching the table's column structure.Why other options are incorrect:
Option B: my_table UNION VALUES ('a1', 6, 9.4)
Option C: INSERT VALUES ('a1', 6, 9.4) INTO my_table
INSERT INTO table_name VALUES (...).Option D: UPDATE my_table VALUES ('a1', 6, 9.4)
Option E: UPDATE VALUES ('a1', 6, 9.4) my_table
Key Learning Points:
INSERT INTO table_name VALUES (...) to append new records to a table.