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

MySQL 一次插入多值

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:56:261325browse

方法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

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