MySQL Forums
Forum List  »  Newbie

Re: NULL but TRUE
Posted by: Peter Brawley
Date: March 29, 2013 10:39AM

> I was just matching Perl's syntax for a similar concept.

I don't use Perl much any more. Doesn't that Perl syntax have something to do with exponentials?

> ...silently casting 'NULL<>?' to Null and then FALSE is illogical...

MySQL does no such thing; it just evaluates the expression according to standard rules. If you need to allow for the possibility of a NULL value, code it. Doing so, you may find the <=> null-safe equal operator useful: it tests equality like =, but returns 1 rather than NULL if both operands are NULL, and 0 rather than NULL if one operand is NULL.

Options: ReplyQuote


Subject
Written By
Posted
March 28, 2013 04:09PM
March 28, 2013 09:44PM
March 28, 2013 11:47PM
March 29, 2013 09:52AM
March 29, 2013 10:22AM
Re: NULL but TRUE
March 29, 2013 10:39AM
March 29, 2013 01:03PM
March 29, 2013 01:51PM
March 29, 2013 02:08PM
March 29, 2013 02:23PM
March 29, 2013 03:13PM
March 29, 2013 03:58PM
March 29, 2013 04:01PM
March 29, 2013 04:02PM
March 30, 2013 12:47PM
March 29, 2013 05:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.