I found this strange behavior in SQLite:

While testing whether SQLite performs cast before comparison or just return
0, I entered following:

    SELECT CAST(123 AS INT)='123';

And for my surprise, it returned 1!!!

However, my previous tests checked that numeric/text comparisons always
returned 0.
Check:

    SELECT 123=123.0; // 1
    SELECT 123='123'; // 0
    SELECT CAST(123 AS TEXT)='123'; // 1
    SELECT CAST(123 AS NUMERIC)='123'; // 1 ???

How is this possible?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to