SQL Insert

6.Which command inserts multiple rows?
  • A. INSERT table VALUES (1,2), (3,4);
  • B. ADD VALUES (1,2), (3,4);
  • C. INSERT MANY table (1,2), (3,4);
  • D. MULTI INSERT INTO table VALUES();

INSERT table VALUES (1,2), (3,4);

INSERT table VALUES (1,2), (3,4);

7.What happens if the number of values in INSERT doesn’t match columns?
  • A. Warning
  • B. Row is ignored
  • C. Syntax Error
  • D. Null values inserted

Syntax Error

Syntax Error

8.Can we use INSERT with SELECT?
  • A. No
  • B. Only in MySQL
  • C. Yes, to copy data from another table
  • D. Only with WHERE

Yes, to copy data from another table

Yes, to copy data from another table

9.Which of the following is valid?
  • A. INSERT INTO table SET col1=1, col2=2; (MySQL only)
  • B. INSERT INTO table (col1=1, col2=2);
  • C. INSERT table WITH VALUES 1,2;
  • D. None

INSERT INTO table SET col1=1, col2=2; (MySQL only)

INSERT INTO table SET col1=1, col2=2; (MySQL only)

10.Which of the following is not a valid use of INSERT?
  • A. INSERT INTO table DEFAULT VALUES;
  • B. INSERT INTO table () VALUES ();
  • C. INSERT INTO table VALUES ();
  • D. INSERT INTO table WITH VALUES ();

INSERT INTO table WITH VALUES ();

INSERT INTO table WITH VALUES ();