On 9 May 2012 14:17, Pavel Ivanov <paiva...@gmail.com> wrote:
>> As the last three statements are exactly the same (in meaning).
>> Can someone explain what's happening?
>
> I think you've got trapped by double value storage imprecision.
> Comparing double values for exact equality is pretty dangerous - two
> numbers can differ in one last bit, be not equal and be displayed
> identically when printed in decimal form.
>
>
> Pavel
>

I rather think that it is an affinity issue:

http://www.sqlite.org/datatype3.html#affinity
and
http://www.sqlite.org/datatype3.html#comparisons

Consider:

sqlite> select 123.456='123.456';
0
sqlite> select cast( 123.456 as real ) = '123.456';
1
sqlite> select 123.456 = 0+'123.456';
1

Regards,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to