首页 > Linux操作系统 > Linux操作系统 > 【SQL】DECODE用法
DECODE(value, if1, then1, if2,then2, if3,then3, . . . else )
decode函数比较表达式和搜索字,如果匹配,返回结果;如果不匹配,返回default值;如果未定义default值,则返回空值。
decode(b.bh,null,0,decode(yy_dm,0,b.je,0))
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24432966/viewspace-722730/ ,如需转载,请注明出处,否则将追究法律责任。