Looking for sqlite Answers? Try Ask4KnowledgeBase
Looking for sqlite Keywords? Try Ask4Keywords

sqlite Using booleans


Example

For booleans, SQLite uses integers 0 and 1:

sqlite> SELECT 2 + 2 = 4;
1
sqlite> SELECT 'a' = 'b';
0
sqlite> SELECT typeof('a' = 'b');
integer
> CREATE TABLE Users ( Name, IsAdmin );
> INSERT INTO Users VALUES ('root', 1);
> INSERT INTO Users VALUES ('john', 0);
> SELECT Name FROM Users WHERE IsAdmin;
root