mysql中的case when then 的用法

 

将立立饭饭的性别变更为女 ,烦烦 嗯嗯 问我的性别变更为男

update `table`  set 
sex = (
case 
    when sname in('立立','饭饭') 
    then  ''
    else ''
end
)

 

posted @ 2019-08-09 10:24  乐乐熊小妹  阅读(11400)  评论(2编辑  收藏  举报