select case name
when 'kabul' then 'k'
else 'other'
end as 'name' from city;
name
k
other
other
other
other
...
select case name
when 'kabul' then 'k'
else 'other'
end as 'name' from city;
name
k
other
other
other
other
...
安装MySQLworkbench以及环境配置的详细教程
mysql select case
mysql的case when可以写在列里面,也可以写在where条件里SELECT mi.*, mo.OrderStatus, ( CASE
Mysql的if既可以作为表达式用,也可在存储过程
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M