对表批量插入数据。Mysql
insert into 表名 values(v1,v2,..),values(v1,v2,...),...

insert into actor 
values(1,"PENELOPE","GUINESS",'2006-02-15 12:34:33'),
(2,"NICK","WAHLBERG",'2006-02-15 12:34:33')

这条语句高度依赖表中列的定义顺序。虽然简单,但是并不安全。如果表的结构发生变化,就会报错。最好表名后给出列名(如下)。这样即使表的结构发生变化,语句依然可以执行。(悄悄的嘀咕~虽然更繁琐)。

insert into actor
(actor_id,first_name,last_name,last_update)
values
(1,"PENELOPE","GUINESS","2006-02-15 12:34:33"),
(2,"NICK","WAHLBERG","2006-02-15 12:34:33")