Oracle 中 decode 对一个字段的值进行判断后 更改另一个字段值

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/baidu_41690072/article/details/87934010

 当class ='13' 的时候 如果 name ='张三' 时 令 age=15

select decode(name,'张三',15,age) 
from student 
where caless = '13' order by name desc

猜你喜欢

转载自blog.csdn.net/baidu_41690072/article/details/87934010