> You explicitly put strings into both columns. The two values are the same
> even though you declared the columns differently. As I told you before,
> if you want to see what type something is, use typeof(thing).
>
> ~
> ~
> ~
> ~
>
> Simon.
Thank you guys. I follow this list so I may
On 29-3-2015 18:53, Simon Slavin wrote:
>
>> On 29 Mar 2015, at 5:31pm, Luuk wrote:
>>
>> On 19-3-2015 16:02, Simon Slavin wrote:
>>>
>>> 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
On 19-3-2015 16:02, Simon Slavin wrote:
>
> On 19 Mar 2015, at 2:56pm, Paul 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
> On 29 Mar 2015, at 5:31pm, Luuk wrote:
>
> On 19-3-2015 16:02, Simon Slavin wrote:
>>
>> 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
On Sunday, 29 March, 2015 10:31, Luuk inquired:
>On 19-3-2015 16:02, Simon Slavin wrote:
>> On 19 Mar 2015, at 2:56pm, Paul 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
* Paul:
> 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?
In SQLite, string literals have manifest type string. This is
different from SQL, where string
On 2015-03-19 05:32 PM, Paul wrote:
>>On 19 Mar 2015, at 3:19pm, Paul wrote:
>>
>>> This may cause very nasty hard-to-find bugs, since SQLite allows to store
>>> any content inside BLOB field:
>>>
>>> sqlite> create table foo(a int, b int, primary key(a, b));
>>> sqlite> insert into foo(a,
> On 19 Mar 2015, at 3:19pm, Paul wrote:
>
> > This may cause very nasty hard-to-find bugs, since SQLite allows to store
> > any content inside BLOB field:
> >
> > sqlite> create table foo(a int, b int, primary key(a, b));
> > sqlite> insert into foo(a, b) VALUES(1, ''), (1, x'');
> > sqlite
> On 3/19/15, Paul 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?
> >
>
> Because it has never before occurred to the developers
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?
Suppose I have data in FOO table. By what means can I tell
what is inside of my_blob column of FOO, when
SELECT len
On 19 Mar 2015, at 3:19pm, Paul wrote:
> This may cause very nasty hard-to-find bugs, since SQLite allows to store any
> content inside BLOB field:
>
> sqlite> create table foo(a int, b int, primary key(a, b));
> sqlite> insert into foo(a, b) VALUES(1, ''), (1, x'');
> sqlite> select *, length
On 19 Mar 2015, at 2:56pm, Paul 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 g
As a general rule of thumb, if things are different type, they can't be equal.
One already knows the column type. To compare apples to apples, one
would cast to convert them.
sqlite> SELECT '' = x'';
0
sqlite> SELECT cast('' as blob) = x'';
1
Perhaps some confusion comes from how numbers are sto
On 3/19/15, Paul 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?
>
Because it has never before occurred to the developers that somebody
would com
14 matches
Mail list logo