DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #23
A data engineer has been given a new record of data: 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…
The correct answer is A. INSERT INTO my_table VALUES ('a1', 6, 9.4). The correct SQL syntax for appending rows to an existing table is INSERT INTO <table_name> VALUES (...). Option B (UNION) is not a standalone DML command for inserting. Option C reverses the clause order and is invalid syntax. Options D and E use UPDATE, which modifies existing…
Question
Options
- AINSERT INTO my_table VALUES ('a1', 6, 9.4)
- Bmy_table UNION VALUES ('a1', 6, 9.4)
- CINSERT VALUES ( 'a1' , 6, 9.4) INTO my_table
- DUPDATE my_table VALUES ('a1', 6, 9.4)
- EUPDATE VALUES ('a1', 6, 9.4) my_table
How the community answered
(33 responses)- A91% (30)
- C6% (2)
- E3% (1)
Explanation
The correct SQL syntax for appending rows to an existing table is INSERT INTO <table_name> VALUES (...). Option B (UNION) is not a standalone DML command for inserting. Option C reverses the clause order and is invalid syntax. Options D and E use UPDATE, which modifies existing rows matching a condition rather than adding new rows. Only option A follows standard SQL INSERT syntax.
Topics
Community Discussion
No community discussion yet for this question.