批量插入

1
INSERT INTO users(name, age) VALUES('姚明', 25), ('比尔.盖茨', 50), ('火星人', 600);

批量更新

1
UPDATE member SET descipt = "默认" WHERE usertypeid IN (1,2,3,4);
1
2
3
4
5
6
7
UPDATE member
SET descipt = CASE id
WHEN 1 THEN '默认'
WHEN 2 THEN '黄铜'
WHEN 3 THEN '黄金'
END
WHERE id IN (1,2,3);

批量删除

1
DELETE FROM users WHERE id IN (1,2,3,4);