DEV Community

AntDB
AntDB

Posted on

AntDB-Oracle Compatibility Developer’s Manual P3–67

NULLIF

If value1 and value2 are equal, the function NULLIF returns the null value, otherwise it returns value1.

NULLIF(value1, value2)

Example:

create table test(id int, math int); insert into test values(1,88),(2,89),(3,100),(4,99); select nullif(math, 100) from test; NULLIF ---------------- 88 89 99 (4 rows) 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)