> And so text '1' in view_test is not equal to text '1' in view_test2. Are you 
> sure
> that current datatypes realisation is right?

Are you sure that when you compare column in view to something it is
not optimized to get value from table and compare it? In this case
your results are explainable.

Pavel

On Sat, Oct 31, 2009 at 11:13 AM, Alexey Pechnikov
<pechni...@mobigroup.ru> wrote:
> Hello!
>
> $ sqlite3
> SQLite version 3.6.19
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> create table test(a blob);
> sqlite> insert into test values(1);
> sqlite> insert into test values('1');
> sqlite> create view view_test as select a||'' as a from test;
> sqlite> select typeof(a) from view_test;
> text
> text
> sqlite> select * from view_test where a=1;
> sqlite> create view view_test2 as select cast(a as text) as a from test;
> sqlite> select typeof(a) from view_test2;
> text
> text
> sqlite> select * from view_test2 where a=1;
> 1
> 1
>
> And so text '1' in view_test is not equal to text '1' in view_test2. Are you 
> sure
> that current datatypes realisation is right?
>
> Best regards, Alexey Pechnikov.
> http://pechnikov.tel/
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to