Possible Duplicate:
SELECT max(x) is returning null; how can I make it return 0?
当我执行
select max(column) from mytable;
我的表没有行,它返回null.如何修改select语句,使其返回零?
Possible Duplicate:
SELECT max(x) is returning null; how can I make it return 0?
当我执行
select max(column) from mytable;
我的表没有行,它返回null.如何修改select语句,使其返回零?
select coalesce(max(column), 0) from mytable;