Hello !  

Thank you for the good example and explanation !  

Cheers !  
>  Sun Sep 13 2015 2:06:14 am CEST CEST from "James K. Lowden"
><jklowden at schemamania.org>  Subject: Re: [sqlite] Third test of json and
>index expressions, now it works
>
>  On Wed, 09 Sep 2015 09:56:12 +0200
> "Domingo Alvarez Duarte" <sqlite-mail at dev.dadbiz.es> wrote:
> 
>  
>>With your knowledge could you give your view about how evaluation of
>> calculated/function columns should be done to have correct results. 

>  ....
>  
>>CREATE TABLE a(b); 

>  ....
>  
>>SELECT a, random() as r FROM a WHERE r <> r; 
>> 

>  That's a syntax error, because there is no column a.r. 
> 
> Once you reorganize it to make it syntactically valid, the answer
> becomes clear:
> 
> select a, r from ( 
> SELECT a, random() as r FROM a 
> ) as R 
> WHERE r <> r;
> 
> will yield zero rows, every time. Whatever value RANDOM produces goes
> in the "r" column and any value, including "r", is always equal to
> itself. 
> 
> --jkl
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
>
>  



?

Reply via email to