Notes insert data into MySQL

Insert data (insert into table name (field name) values ​​(value of each field))
insert into teacher (id, name, age) values ​​(1, 'raindrop', 38), the meaning of this sentence: insert one in the teacher table Data, the fields are id, name, and age; the field names after the table name can be dropped out of order, and the following values ​​can also be dropped together. Do not fill in all fields in the default table

Insert multiple pieces of data: insert into teacher values ​​(0, 'Zhou Runfa', 32), (0, 'Jiang Long', 83), (0, 'Tang Wei', 29) ... (here 0 represents the primary key, since increase)

Insert specified fields: insert into teacher (id, name) values ​​(0, 'Qiu Shuzhen'), (0, 'Zhang Min') ......

Guess you like

Origin www.cnblogs.com/will-wu/p/12717501.html