Multiple choice sql

With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

  1. INSERT INTO Persons (LastName) VALUES ('Olsen')

  2. INSERT ('Olsen') INTO Persons (LastName)

  3. INSERT INTO Persons ('Olsen') INTO LastName

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

INSERT INTO table (column) VALUES (value) is the correct syntax for inserting into specific columns. The column list in parentheses must come before VALUES.

AI explanation

The correct SQL INSERT syntax specifies the target table, the column list in parentheses, then VALUES with the corresponding values: INSERT INTO Persons (LastName) VALUES ('Olsen') — this is valid and correct. The other two options garble the syntax: INSERT ('Olsen') INTO Persons (LastName) puts VALUES before INTO and omits the VALUES keyword entirely, and INSERT INTO Persons ('Olsen') INTO LastName incorrectly repeats INTO and misplaces the column name — neither is valid SQL grammar.