Alex Dupre <sysad...@alexdupre.com> wrote: > is it expected the following behavior or is it a bug? > > %sqlite3 test.db > SQLite version 3.7.9 2011-11-01 00:52:41 > sqlite> CREATE TABLE a (x BLOB); > sqlite> INSERT INTO "a" VALUES(X'30313233'); > sqlite> INSERT INTO "a" VALUES('0124'); > sqlite> SELECT x, typeof(x) FROM a WHERE x LIKE '012%'; > 0123|blob > 0124|text > sqlite> select * from a where x = '0123'; <=== no record found
It's expected. LIKE operator converts its parameters to strings. = doesn't, but takes actual types into account. Consider: select 1='1', 1 like '1'; 0|1 -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users