(text/x-fossil-wiki)
<verbatim>
SQLite version 3.8.5 2014-03-22 02:19:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table t(x);
sqlite> insert into t values('1');
sqlite> select typeof(x) from t;
text
sqlite> select typeof(x) from t where x=x+0;
integer
sqlite>
</verbatim>
Introduced by [58704ed1f4cd78bb].
(text/x-fossil-wiki)
Another example script:
<blockquote><verbatim>
CREATE TABLE t(x,y);
INSERT INTO t VALUES('1','1');
SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1';
</verbatim></blockquote>
|