Skip to content


MySQL 语句中 INSERT 语句的另一种写法

MySQL 中的 INSERT 语句还可以这样写:

INSERT INTO tbl_name (col1, col2) VALUES (value1_1, value1_2),(value2_1, value2_2),(value3_1, value3_2)…

相当于: INSERT INTO tbl_name (col1, col2) VALUES (value1_1, value1_2) INSERT INTO tbl_name (col1, col2) VALUES (value2_1, value2_2) INSERT INTO tbl_name (col1, col2) VALUES (value3_1, value3_2)

如果在执行过程中碰到一个值错误,则这个值以后的数据都不会被插入。

Posted in Technology.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.