
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 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
INSERT VALUES ('a1', 6, 9.4) INTO my_table
C
UPDATE my_table VALUES ('a1', 6, 9.4)
D
UPDATE VALUES ('a1', 6, 9.4) my_table
Explanation:
The correct answer is A because:
INSERT INTO table_name VALUES (...) correctly specifies the table name first, followed by the VALUES clause containing the data to insert.INSERT VALUES ... INTO is not valid SQL.UPDATE which is for modifying existing records, not appending new ones.UPDATE with incorrect syntax.Key Points:
INSERT INTO is used to add new rows to a tableUPDATE is used to modify existing rowsINSERT INTO table_name VALUES (value1, value2, ...)