Skip to main contentSkip to solution

Assume a table 'GUARDIAN' having 4 columns viz. 'Guid', 'Gname', 'Gphone' and 'Gadd'. Which of the following command is correct for inserting a record into the table?

Solution

✅ Correct Option: 2

The correct SQL syntax is INSERT INTO table_name VALUES (...)\text{INSERT INTO table\_name VALUES (...)}. When all columns are being filled, the column list can be left out, and the values must follow the column order: Guid, Gname, Gphone, Gadd. Option 2 follows this syntax exactly.


Option 1: the keyword VALUES is missing. Without it, the bracket would be read as a list of column names, and numbers and strings are not valid column names.

Options 3 and 4: the keyword INTO is missing. Option 4 also uses VALUE instead of VALUES.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question