case when then else end
程序员文章站
2024-02-22 23:32:28
...
1、批量更新多个条件多个值
UPDATE quesgo_game_details
SET user_choice = CASE question_id
WHEN '100_243944' THEN 'A'
WHEN '100_446929' THEN 'B'
WHEN '100_568287' THEN 'C'
else '什么也没有选'
END
WHERE question_id IN ('100_243944','100_446929','100_568287','100_444003','100_433531');
推荐阅读
-
case when then else end
-
case when then else end
-
case … when … then … when … then … else ... end
-
case when then else end
-
case when then else end
-
MySql 中 case when then else end 的用法
-
MySQL的 case when then else end
-
oracle中的case when then else end 用法
-
Spring如何消除代码中的if-else/switch-case
-
velocity第8个应用例子----#if#else#end