
Answer-first summary for fast verification
Answer: `INSERT INTO my_table VALUES (‘c01‘, 9, 6.2)`
The `INSERT INTO` statement is the correct SQL command for adding a new row of data to an existing table. The syntax `INSERT INTO my_table VALUES (‘c01‘, 9, 6.2)` accurately specifies the table name (`my_table`) and the values for the new record, matching the table's schema. This command efficiently appends the new record to the table, ensuring the data is added as a new row. This approach is straightforward and meets the requirement to include a new record in the table.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A data engineer is tasked with appending a new record to an existing Delta table named my_table. The record details are as follows: id STRING = ‘c01‘, rank INTEGER = 9, rating FLOAT = 6.2. Which SQL command should be used to add this new record to my_table?
A
UPDATE my_table VALUES (‘c01‘, 9, 6.2)
B
INSERT INTO my_table VALUES (‘c01‘, 9, 6.2)
C
UPDATE VALUES (‘c01‘, 9, 6.2) my_table
D
my_table UNION VALUES (‘c01‘, 9, 6.2)
E
INSERT VALUES (‘c01‘, 9, 6.2) INTO my_table