Home >Database >Mysql Tutorial >How to insert data in mysql
Mysql method of inserting data: You can insert data by executing the [INSERT INTO table_name (field) values (value)] command. If you are inserting character data, you need to use single quotes or double quotes, such as "value".
Use the INSERT INTO SQL statement in the MySQL table to insert data. You can enter data into the data table through the mysql> command prompt window, or enter data through a PHP script.
(Video tutorial recommendation: mysql video tutorial)
The following is a common INSERT for inserting data into a MySQL data table INTO SQL syntax:
INSERT INTO table_name ( field1, field2,...fieldN ) VALUES( value1, value2,...valueN );
If the data is character type, you must use single quotes or double quotes, such as: "value".
The above is the detailed content of How to insert data in mysql. For more information, please follow other related articles on the PHP Chinese website!