On 1/26/17, Jeffrey Mattox <j...@me.com> wrote:
> When used in a SELECT, I expect this comparison to be true (and it is):
>    ( cast('25' as INTEGER) = 25 )  <--- true
>
> But, why is this false:
>    ( '25' = 25 )  <--- false?
>
> and this is true:
>    ( cast(25 as TEXT) = 25 )  <--- true
>
> So, being that second comparison is false (why?), then why isn't the third
> comparison also false?
>

https://www.sqlite.org/datatype3.html#compaff

The third condition applies to your first two examples.  The second
condition applies on the third example.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to