SELECT to return 0 instead of NULL?
- Date: Fri, 23 May 2008 11:23:34 -0400 (EDT)
- From: "Tuc at T-B-O-H.NET" <ml@xxxxxxxxxxx>
- Subject: SELECT to return 0 instead of NULL?
Hi,
I'm running a query :
SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='hotspot';
But if there aren't any rows in "radacct" for the UserName of
"hotspot", it returns a NULL. Is there a way to change it to return 0
instead? (I can't change the application, but I can change the SQL)
Thanks, Tuc
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=royale@xxxxxxxxxx