You can use COALESCE( age, 0 ) as age to have it return 0 instead of
null in the query.
Since SQLSS doesn't support NULL, I never return them, even on outer
joins. Our DBA says NULLable columns are slower anyway in MySQL.
From: Warren Young [mailto:mysqlpp@stripped]
Sent: Thursday, September 28, 2006 3:09 PM
To: MySQL++ Mailing List
Subject: Re: Mysql++ list post
Urscheler, Roger (COM Chantry CA) wrote:
> I have a table 'Person' with column 'age' that allows NULL. How can I
> use SSQLS to read that table and return '0' for age if age is 'NULL'?
Search the list: there is a thread about this giving a patch, and an
explanation of why you won't see it in the main distribution anytime
soon. (Short version: you have to break the ABI to fix this, so we
can't do it until v3.0, and there are many other things I want to get to
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus