2

I want to replace null values from a column to 0 using coalesce() function instead of isNULL(). Can anyone tell me how ?

Alex Ott
  • 80,552
  • 8
  • 87
  • 132

1 Answers1

1

You need to use nvl function instead (see docs), like this:

select nvl(column, 0) as column from ...

Or coalesce itself (but for me nvl is more natural:

select coalesce(column, 0) as column from ...
Alex Ott
  • 80,552
  • 8
  • 87
  • 132