How to return 0 on max function when no rows found
971819Oct 31 2012 — edited Nov 1 2012Hi everyone!
I am using a max fuction, but I want that the function return 0 if there are not rows that match with the conditions.
I was thinking in something like this
SELECT nvl(max(salary),0)
But it doesn't work, it doesn't show the value 0
Please someone can give and idea
Thanks a lot.