'isnull' how to get a default value in return if a field is empty?

'isnull' how to get a default value in return if a field is empty?

Post by JHH Drent » Sat, 24 Feb 2001 22:29:10



In MS-SQL 6.5 a query like:

select isnull(fieldname, -1)

would return -1 if the field value would be 'null' (plus all the other
values found in this field ofcourse)
How would I state this for PostgreSQL?

Many, many, many thanks in advance!
Hendrik-Jan