your negative aura just zeroes me out

Posted on October 6th, 2009 by whinger. Filed under Tech, Whinges.


So in this post I talked about -COALESCE(null, 0) returning -0 in my legacy 5.0.15 mysql server and moaned that I couldn’t use -COALESCE(null, -0) to get around it.

It occurred to me that this might be because the parser intercepts the “-0” and goes “don’t be silly”. So I tried this:

SELECT -COALESCE(null, -COALESCE(null, 0))

and – genius! – it works!

Tags:



Trackback URI | Comments RSS

Leave a Reply


Blogroll

Categories