[thelist] MYSQL column type properties

rudy rudy937 at rogers.com
Thu Sep 25 00:13:49 CDT 2003

> select firstname + ' ' + middlename + ' ' + lastname  from yourtable
> If any of the three was NULL then the result of the concatenation would be
> NULL.  If they are empty strings instead of NULL's then you get back
> something close to what you'd expect.

good point

but that's why COALESCE exists

and you'd use it wisely, so that there isn't an extra space between first
and last names when the middle name is missing


More information about the thelist mailing list