为什么此查询不起作用? (我试图替换嵌套的IF语句“… SET lkey = IF(lkey> = 11,lkey-5,IF(lkey> 5,lkey 2,lkey)
@H_502_4@UPDATE pages SET lkey = CASE lkey WHEN lkey >= 11 THEN lkey - 5 ELSE CASE lkey WHEN lkey > 5 THEN lkey + 2 ELSE lkey END END,rkey = CASE lkey WHEN lkey >= 11 THEN rkey - 5 ELSE CASE rkey WHEN rkey < 11 THEN rkey + 2 ELSE rkey END END WHERE rkey > 5 AND lkey < 12;