Re: Interesting query outcomes

Joe <[email protected]> Fri, 28 Aug 2020 13:56:07 -0700 (PDT)
Newsgroups comp.databases.mysql
Message-ID <[email protected]>
On Thursday, August 27, 2020 at 11:45:59 AM UTC-5, Johann Klammer wrote:
> On 08/18/2020 10:33 PM, Joe wrote: 
> > select CASE WHEN (TNAM is NULL || TNAM='') THEN 'default' 
> > ELSE TNAM END, count(1) 
> > from ITEMS group by 1;
> What happens if you do: 
> 
> select CASE WHEN (TNAM is NULL || TNAM=''|| TNAM='default') THEN 'default'
> ELSE TNAM END, count(1) 
> from ITEMS group by 1;

Interesting thoughts but it didn't help (tried) because there is no 'default' value in the table.