Using standard ANSI SQL syntax (not vendor-specific extensions), which of the following statements correctly inserts a new record into the table Students so that Name is 'Alice' and Age is 10?
INSERT INTO Students SET Name='Alice', Age=10;
ADD RECORD Alice, 10 TO Students;
UPDATE Students ADD (Name, Age) VALUES ('Alice', 10);
INSERT INTO Students (Name, Age) VALUES ('Alice', 10);
The statement "INSERT INTO Students (Name, Age) VALUES ('Alice', 10);" follows ANSI SQL syntax for inserting a row: it names the target table, lists the columns, and supplies matching values in the VALUES clause. The other choices are invalid in standard SQL: the SET form is a MySQL-only extension, "ADD RECORD" is not an SQL command, and combining UPDATE with ADD and VALUES is syntactically incorrect.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 'INSERT INTO' command do in SQL?
Open an interactive chat with Bash
What are the common mistakes when inserting data in SQL?
Open an interactive chat with Bash
What is the difference between 'INSERT INTO' and 'UPDATE' in SQL?