How to insert sql statement: [insert into table_name values (value1, value2, value3,...);]. You can also specify the column name when inserting data, such as [insert into table_name (column1)].
##Basic syntax of SQL insert into
(Recommended tutorial:mysql video tutorial)
The insert into statement can be written in two forms: 1. There is no need to specify the column name to insert data, just provide the inserted value:insert into table_name values (value1,value2,value3,...);
insert into table_name (column1,column2,column3,...) values (value1,value2,value3,...);
Let’s take an example to see how to use the insert into statement to perform the insertion operation:
Existing data table demo : After performing the following operations://必须顺序插入demo对应的字段 insert into demo values(5,"小小",20,"女");
//值和名字对应即可 insert into demo(name, id,age,sex) values("赵峰",6,21,"男");
The above is the detailed content of How to write insert sql statement. For more information, please follow other related articles on the PHP Chinese website!