Consider an employee table having two columns namely 'LastName' and 'FirstName'. Identify the Correct INSERT queries from the following:
A. INSERT INTO employee ("aaa","bbb");
B. INSERT INTO employee VALUE ("aaa","bbb");
C. INSERT INTO employee VALUES ("aaa","bbb");
D. INSERT INTO employee (LastName, FirstName) VALUES ("aaa","bbb");
Consider an employee table having two columns namely 'LastName' and 'FirstName'. Identify the Correct INSERT queries from the following:
A. INSERT INTO employee ("aaa","bbb");
B. INSERT INTO employee VALUE ("aaa","bbb");
C. INSERT INTO employee VALUES ("aaa","bbb");
D. INSERT INTO employee (LastName, FirstName) VALUES ("aaa","bbb");
Solution
Standard SQL has two valid forms of INSERT. The first is , which supplies a value for every column in table order, as in C. The second is , which names the columns explicitly, as in D.
A: it has no VALUES keyword, so the syntax is invalid.
B: the keyword is VALUES, not VALUE, in standard SQL (MySQL happens to accept VALUE as a synonym, but it is not standard).
When a column list is not given, the values must follow the table's column order. Here that means LastName first, then FirstName.
Related questions:
2026: 20 May Shift 1
2025: 3 June Shift 2
2026: 29 May Shift 1