Mysql adds multiple pieces of data through the command
Mysql adds multiple pieces of data through the command
1. Syntax:
INSERT INTO table name (field 1, field 2... Field n)
VALUES
(worth 1, worth 2. Value n)
(worth 1, worth 2. Value n)
...
(worth 1, worth 2. Value n)
two。 Syntax parsing:
INSERT INTO... VALUES...: insert data into a table command
3. Example:
INSERT INTO
Student (name,sex)
VALUES
('xiaoxiao',0)
('xusu',0)
('yuanya',0)
4. Example screenshot:
Take a screenshot before adding data:
Screenshot of code execution:
Take screenshots after adding data: