批量更新
拼接的SQL语句类似于这种:
* UPDATE book
* SET book_id = CASE id
* WHEN 1 THEN 3
* WHEN 2 THEN 4
* WHEN 3 THEN 5
* END,
* name = CASE id
* WHEN 1 THEN 'New Title 1'
* WHEN 2 THEN 'New Title 2'
* WHEN 3 THEN 'New Title 3'
* END
* WHERE id IN (1,2,3)
book 表名 book_id name 更新字段
CASE id WHEN 1 THEN 3
id为判断条件
WHEN 1为id==1
THEN 3为book_id更新成3