On 19-3-2015 16:02, Simon Slavin wrote:
>
> On 19 Mar 2015, at 2:56pm, Paul <devgs at ukr.net> wrote:
>
>> Maybe this question was already asked and explained.
>> Or maybe it is documented somewhere (could not fiund it).
>> Sorry, if this is the case, but why does
>>
>> SELECT '' = x'';
>>
>> yields 0?
>
> One is a string.  The other is a BLOB.  SQLite doesn't even get as far as 
> testing the contents, it knows they are of different types.
>

C:\temp>sqlite3
SQLite version 3.8.8.3 2015-02-25 13:29:11
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table test (x string, y blob);
sqlite> insert into test values ('x','x');
sqlite> select * from test;
x|x
sqlite> select x,y, x=y from test where x=y;
x|x|1
sqlite>


Can you comment on:
"SQLite doesn't even get as far as testing the contents, it knows they 
are of different types."
?

Reply via email to