Luís Simão wrote: > SELECT 123='123'; // 0 > SELECT CAST(123 AS NUMERIC)='123'; // 1 ??? > > How is this possible?
Plain 123 or '123' has affinity NONE. CAST(123 AS NUMERIC) has affinity NUMERIC, so the string gets automatically converted for the comparison. See <http://www.sqlite.org/datatype3.html#expraff>. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users