Home > Database > Mysql Tutorial > How to insert data in mysql

How to insert data in mysql

little bottle
Release: 2020-09-16 14:09:07
Original
11943 people have browsed it

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".

How to insert data in mysql

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 );
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template