Re: find any row with NULL
- Date: Fri, 29 Jul 2016 16:28:17 +0200 (CEST)
- From: Johan De Meersman <vegivamp@xxxxxxxxx>
- Subject: Re: find any row with NULL
----- Original Message -----
> From: "lejeczek" <peljasz@xxxxxxxxxxx>
> 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