mysql update case when then select case when then
SELECT CASE WHEN a > b THEN ‘a>b’ WHEN a = b THEN ‘a=b’ ELSE ‘a<b’ END AS ‘结果’ FROM maxthree update maxthree set a= case when a>b then 1 when a=b then 0 when a<b then 2 end
出处:http://www.iphpmysql.cn/mysql-update-case-when-then-select-case-when-then.html

浙公网安备 33010602011771号