1. 程式人生 > >34. 批量插入資料

34. 批量插入資料

題目描述

對於表actor批量插入如下資料
CREATE TABLE IF NOT EXISTS actor (
actor_id smallint(5) NOT NULL PRIMARY KEY,
first_name varchar(45) NOT NULL,
last_name varchar(45) NOT NULL,
last_update timestamp NOT NULL DEFAULT (datetime('now','localtime')))

actor_id

first_name

last_name

last_update

1

PENELOPE

GUINESS

2006-02-15 12:34:33

2

NICK

WAHLBERG

2006-02-15 12:34:33

INSERT INTO actor
VALUES
	(
		1,
		"PENELOPE",
		"GUINESS",
		'2006-02-15 12:34:33'
	),
	(
		2,
		"NICK",
		"WAHLBERG",
		'2006-02-15 12:34:33'
	);