Home > Database > Mysql Tutorial > MySQL 一次插入多值

MySQL 一次插入多值

WBOY
Release: 2016-06-07 16:56:26
Original
1321 people have browsed it

方法1: INSERT INTO table(col_1, col_2,col_3) VALUES(

方法1: INSERT INTO table(col_1, col_2,col_3)   VALUES('1','11','111'); INSERT INTO table(col_1, col_2,col_3)   VALUES('2','22','222'); INSERT INTO table(col_1, col_2,col_3)   VALUES('3','33','333'); 有没有更快捷的办法呢?

答案是有(见方法2)

方法2: INSERT INTO table(col_1, col_2,col_3)   VALUES('1','11','111'), ('2','22','222'), ('3','33','333');

linux

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