1、批量插入
INSERT INTO table (field1,field2,field3)
VALUES (‘a‘,"b","c"), (‘a‘,"b","c"),(‘a‘,"b","c")
2、批量更新
UPDATE T_Free_Orders_Record
SET sendtime =
CASE
WHEN id = 1 THEN ‘2016-07-14 15:18:21‘
WHEN id = 2 THEN ‘2016-07-14 21:32:08‘
WHEN id = 3 THEN ‘2016-07-15 12:35:21‘
WHEN id = 4 THEN ‘2016-07-15 20:47:24‘
END
WHERE id IN (1,2,3,4)
时间: 2024-11-02 19:08:23