Home  >  Article  >  Database  >  How to insert data in mysql

How to insert data in mysql

little bottle
little bottleOriginal
2019-05-09 16:03:5211853browse

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 );

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!

Statement:
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