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

How to insert data into table in mysql

藏色散人
Release: 2019-06-01 13:45:50
Original
11148 people have browsed it

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

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

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!

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template