List:General Discussion« Previous MessageNext Message »
From:Karl Pielorz Date:March 12 1999 9:20am
Subject:Re: MySQL and NULL entires
View as plain text  
Mike Machado wrote:

> update account set billgroup = "1" where billgroup = "NULL";

Any test with NULL in, is by definition FALSE, therefore the correct way of
doing the above is:

update account set billgroup = 1 where billgroup IS NULL;

Confusing, but you'll get the hang of it... :-)  (IS NULL is a MySQL test for
NULL, that returns TRUE if the item being tested 'is null')

Regards,

Karl
Thread
MySQL and NULL entiresMike Machado12 Mar
  • Re: MySQL and NULL entiresSasha Pachev12 Mar
  • Re: MySQL and NULL entiresThimble Smith12 Mar
  • Re: MySQL and NULL entiresChris12 Mar
  • Re: MySQL and NULL entiresChristian Mack12 Mar
  • Re: MySQL and NULL entiresKarl Pielorz12 Mar
  • Re: MySQL and NULL entiresEd Carp12 Mar
  • Searching for CEOs against software patents"Jonas Norrman6 Oct
  • Re: MySQL quota problemArjen Lentz21 Jan
Re: MySQL quota problemHeikki Tuuri21 Jan