欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

oracle decode()

程序员文章站 2022-07-23 19:56:26
oracle 函数中 decode (state,'false','异常','true','正常') status 等价于 case when state='false' then '异常' when state=‘true’ then '正常' end status 当 status 为 fals ......

oracle

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

等价于

  case 

    when  state='false' then '异常'

    when state=‘true’ then  '正常'

    end status

 当 status 为 false 时,获得 异常

 当 status 为 true 时 ,获得 正常