Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgresql if 0 then 1

-- returns the greatest value, in case 1
select greatest( 0, 1 )
-> 1
-- it also works with null values
select greatest( null, 1 )
-> 1
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgresql
ADD COMMENT
Topic
Name
8+7 =