I want to replace null values from a column to 0 using coalesce() function instead of isNULL(). Can anyone tell me how ?
Asked
Active
Viewed 1,554 times
1 Answers
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
-
2You might want to read the link you shared. "This function is a synonym for coalesce(expr1, expr2).". – David דודו Markovitz Mar 17 '22 at 12:48