sql - Why is the where clause of this query evaluating to false? -


i'm trying understand why where clause of redshift query evaluating false , not returning results.

create temporary table temp (select 1 id); 

problem: query returns no results -

select * (   select     id,     false test   temp) test = false; 

while query returns expected 1 row -

select * (   select     id,     (select false) test   temp) test = false; 

and alternatively, works -

create temporary table temp2 (select 1 id, false test);  select * (   select     id,     test   temp) test = false; 


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -