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

How to insert data into table in mysql

藏色散人
藏色散人Original
2019-06-01 13:45:5011139browse

MySQL is a relational database management system developed by Swedish MySQL AB and currently owned by Oracle. MySQL is a relational database management system that stores data in different tables instead of putting all the data in one big warehouse, which increases speed and flexibility.

How to insert data into table in mysql

How to insert data into the table in mysql?

The insert into command is used to insert data into the table.

insert into command format:

insert into <表名> [(<字段名1>[,..<字段名n > ])] values ( 值1 )[, ( 值n )];

For example:

Insert two records into the table MyClass. These two records represent: number 1 The score of number 2 named Joan is 82.99, and number 3 named Wang has a score of 96.5.

mysql> insert into MyClass values(1,&#39;Tom&#39;,96.45),(2,&#39;Joan&#39;,82.99), (2,&#39;Wang&#39;, 96.59);

Note: insert into can only insert one record into the table at a time.

The above is the detailed content of How to insert data into table 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
Previous article:How to export mysql dataNext article:How to export mysql data