Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle test if 0

-- Replace 0 values by a default value
SELECT nvl(NullIf(COL, 0), 99) FROM (SELECT 0 AS COL FROM DUAL);    -- 99
SELECT nvl(NullIf(COL, 0), 0) FROM (SELECT 500 AS COL FROM DUAL);   -- 500
 
PREVIOUS NEXT
Tagged: #oracle #test
ADD COMMENT
Topic
Name
8+6 =