首页 > 技术文章 > oracle decode()

xiyuekamisama 2018-11-21 15:18 原文

oracle

  函数中 decode (state,'false','异常','true','正常') status

等价于

  case 

    when  state='false' then '异常'

    when state=‘true’ then  '正常'

    end status

 当 status 为 false 时,获得 异常

 当 status 为 true 时 ,获得 正常

推荐阅读