mysql查询if语句case when then

在mysql中如何写if语句

```
select count(*), (CASE userid WHEN '131' THEN '张三' WHEN '132' THEN '李四' WHEN '133' THEN '王五' WHEN '134' THEN '赵六' ELSE '保密' END) as renming from log where status=1 group by renming;
```

    A+
发布日期:2022年01月06日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: