首页 > 数据库 > 数据库开发技术 > case when 语句
select name,id,(case when id=34 then salary*2
when id=45 then salary*3
else salary
end) new_salary
from semp;
————————————————
版权声明:本文为CSDN博主「mry6」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/muriyue6/article/details/73442054
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69949806/viewspace-2908506/ ,如需转载,请注明出处,否则将追究法律责任。