Re: find any row with NULL

Johan De Meersman <[email protected]>
Newsgroups gmane.comp.db.mysql.general
Message-ID <[email protected]>
----- Original Message -----
> From: "lejeczek" <[email protected]>
> Subject: Re: find any row with NULL
> 
> shame NULL won't work as in:
> > select user_id,completetion_time from depression where
> NULL in(email_me, other_diagnosis);
> or does it?

No, because NULL != NULL - it is why there are dedicated operators.

What could work, is that you alter your table to [field NOT NULL DEFAULT ''] - that should transform all the NULL values for field to empty strings.

Not that reverse-in is horribly ineffective as it uses no indices at all; but it might work for you in this case provided you have no empty-stringed fields you need to preserve. If you do, just use a custom impossible value like 'deleteme'.


-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.