MySQL SQLLesson 12Free preview
MySQL INSERT INTO
This lesson is part of MySQL · All levels
Summary
The INSERT INTO command is used to add new lines to a table. You can write the column name explicitly (recommended) and then provide the corresponding value in the VALUES section, even for multiple rows in one command. The text value is pasted with a single quotation mark, and the AUTO_INCREMENT column may be passed so that the value is filled in automatically.
Key points
- INSERT INTO name_table (column1, column2) VALUES (value1, value2); add one row
- One INSERT can contain many lines with a list of VALUES separated by a comma
- The number and order of values must correspond to the list of columns mentioned
- The AUTO_INCREMENT column and the column with the DEFAULT can be passed to use the value of the bucket.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.