Home > Database > Mysql Tutorial > body text

mysql sql 语句插入多行记录

WBOY
Release: 2016-06-07 16:36:14
Original
1203 people have browsed it

正常我们用sql执行 INSERT INTO `tabale` (`name`) VALUE (name) 如果用php的执行这样的sql需要循环的,所以用下面执行一条sql语句插入多行记录。 INSERT INTO `tabale` (`name`) VALUE (name),(name),(name),(name) 你想一次插入多少条添加多少条。 原文地

正常我们用sql执行 INSERT INTO `tabale` (`name`) VALUE (‘name’)

如果用php的执行这样的sql需要循环的,所以用下面执行一条sql语句插入多行记录。

INSERT INTO `tabale` (`name`) VALUE (‘name’),(‘name’),(‘name’),(‘name’)

你想一次插入多少条添加多少条。

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