SELECT max(x) is returning null; how can I make it return 0?

Viewed 124651

How do you return 0 instead of null when running the following command:

SELECT MAX(X) AS MaxX
FROM tbl
WHERE XID = 1

(Assuming there is no row where XID=1)

7 Answers
Related