DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SQL
select if then postgresql
SELECT field1, field2, CASE WHEN field1>0 THEN field2/field1 ELSE 0 END AS field3 FROM test
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#select
#postgresql
ADD COMMENT
Topic
COMMENT
Name
9+4 =
Submit