[thelist] MYSQL column type properties

Joshua Olson joshua at waetech.com
Thu Sep 25 00:01:01 CDT 2003

----- Original Message ----- 
From: "rudy" <rudy937 at rogers.com>
Sent: Thursday, September 25, 2003 12:50 AM

> the following is a rather trivial example, but suppose you have fields for
> first name, last name, and middle name, and you wanted to find out the
> average length of the middle names in your table

Or, let's say you want to concatenate the name together:

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.

Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list