SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE "stack_test" ("id" INTEGER, "bool_col" boolean);
sqlite> insert into stack_test values(1,'t');
sqlite> insert into stack_test values(2,'f');
sqlite> insert into stack_test values(3,'1');
sqlite> insert into stack_test values(4,'0');
sqlite> insert into stack_test values(5,1);
sqlite> insert into stack_test values(6,0);
sqlite> insert into stack_test values(7,banana);
Error: no such column: banana
sqlite> insert into stack_test values(7,'banana');
sqlite> .headers on
sqlite> select * from stack_test;
id|bool_col
1|t
2|f
3|1
4|0
5|1
6|0
7|banana
sqlite> select * from stack_test where bool_col=t;
Error: no such column: t
sqlite> select * from stack_test where bool_col='t';
id|bool_col
1|t
sqlite> select * from stack_test where bool_col=0;
id|bool_col
4|0
6|0
sqlite> select * from stack_test where bool_col=1;
id|bool_col
3|1
5|1
sqlite> select * from stack_test where bool_col=true;
Error: no such column: true
sqlite> select * from stack_test where bool_col=banana;
Error: no such column: banana
sqlite> select * from stack_test where bool_col='banana';
id|bool_col
7|banana
sqlite>
sqlite> .schema stack_test
CREATE TABLE "stack_test" ("id" INTEGER, "bool_col" boolean);
sqlite>
`...其中(COL )`? – 2011-01-28 03:59:05