In this quiz, you will test your understanding of how to insert data into MySQL tables using the INSERT INTOstatement. The questions cover key concepts such as inserting single and multiple rows, using AUTO_INCREMENT, handling NULL values, utilizing INSERT SELECT, and ensuring data integrity with PRIMARY KEY and IGNORE options.
1.
Which SQL clause ensures only distinct values are inserted?
2.
Which keyword is used to allow MySQL to insert rows while prioritizing other transactions?
3.
Which clause is used to insert specific columns from one table into another?
4.
What is the effect of using INSERT LOW_PRIORITY?
5.
How can you check if data was inserted successfully?
6.
What is the purpose of the PRIMARY KEY in a table when inserting data?
7.
What is the best way to insert only selected rows from one table into another?
8.
Which SQL keyword is used to ensure that only unique values are inserted into a table?
9.
Which SQL statement is used to insert a new row into a MySQL table?
10.
What happens when an INSERT statement omits a NOT NULL column?
11.
What happens when you omit the column list in an INSERT statement?
12.
Which MySQL statement creates a new table while copying data from an existing one?
13.
What happens if an INSERT statement tries to insert a duplicate value into a PRIMARY KEY column?
14.
How can you copy an entire table, including its structure and data?
15.
How can you insert a row while allowing MySQL to generate the ID automatically?