[nycphp-talk] Need help understanding NULL
danielc at analysisandsolutions.com
Sat Aug 29 23:57:35 EDT 2009
> In sql, every comparison to NULL, yields another NULL.
> That is why 'SELECT * WHERE foo = NULL' doesn't do what you might
> expect. In fact that query is guaranteed to always return zero rows.
When you want to get rows where foo really is null, you need to need to
use "is null":
SELECT * WHERE foo IS NULL;
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk