表达式函数 本页介绍天翼云TeleDB数据库Oracle语法中的表达式函数。 lnnvl 传入表达式为true返回false;传入为false返回true。 teledb create table tlnnvl(f1 integer, f2 integer); CREATE TABLE teledb insert into tlnnvl values(1,1); INSERT 0 1 teledb insert into tlnnvl values(1,2); INSERT 0 1 teledb insert into tlnnvl values(1,3); INSERT 0 1 teledb insert into tlnnvl values(1,4); INSERT 0 1 teledb insert into tlnnvl values(1,null); INSERT 0 1 teledb select from tlnnvl where lnnvl(f2>2); f1 f2 + 1 1 1 2 1 (3 rows) teledb nvl2 NVL2(E1, E2, E3) 如果E1为NULL,则函数返回E3,若E1不为null,则返回E2。 teledb select NVL2('teledb', 'teledb1'::text, 'teledb2'::text) from dual; nvl2 teledb1 (1 row) teledb select NVL2(NULL, 'teledb1'::text, 'teledb2'::text) from dual; nvl2 teledb2 (1 row) teledb