from_now 发表于 2011-12-22 08:54

几个与null有关的函数

<span class="Apple-style-span" style="font-family: arial, 宋体, sans-serif; line-height: 24px; background-color: rgb(255, 252, 246); ">NVL (expr1, expr2)-&gt;expr1为NULL,返回expr2;不为NULL,返回expr1。注意两者的类型要一致</span><div><span class="Apple-style-span" style="font-family: arial, 宋体, sans-serif; line-height: 24px; background-color: rgb(255, 252, 246); ">&nbsp;NVL2 (expr1, expr2, expr3) -&gt;expr1不为NULL,返回expr2;为NULL,返回expr3。expr2和expr3类型不同的话,expr3会转换为expr2的类型</span></div><div><span class="Apple-style-span" style="font-family: arial, 宋体, sans-serif; line-height: 24px; background-color: rgb(255, 252, 246); ">&nbsp;NULLIF (expr1, expr2) -&gt;相等返回NULL,不等返回expr1</span></div><div><span class="Apple-style-span" style="font-family: Arial; line-height: 22px; white-space: pre-wrap; background-color: rgb(255, 252, 246); ">coalesce(exp1,exp2, exp3……)</span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: rgb(245, 253, 255); ">列表中第一个非空的表达式是函数的返回值,如果所有的表达式都是空值,最终将返回一个空值。</span><span class="Apple-style-span" style="font-family: arial, 宋体, sans-serif; line-height: 24px; background-color: rgb(255, 252, 246); "><br></span></div>
页: [1]
查看完整版本: 几个与null有关的函数