[UPHPU] discovered ISNULL() for default join values in MySQL

Joseph Scott joseph at josephscott.org
Mon Feb 22 17:18:03 MST 2010

On Mon, Feb 22, 2010 at 5:03 PM, Wade Preston Shearer
<wadeshearer.lists at me.com> wrote:
>>You can also use a slick function called coalesce which most db
>>engines support.
> I looked coalesce up and don't see how would work in this case. Will you provide an example?

You didn't provide a specific query to compare with so hard to say
exactly how you would use it in your case.  A few years back I ran
into the oddities of null checking in DBs -

And just to make it even more interesting, MySQL has IS_NULL -
- and ISNULL - http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_isnull

which could make for one tongue twister of a query :-)

COALESCE could be thought of as more generalized null check -

Joseph Scott
joseph at josephscott.org

More information about the UPHPU mailing list