Boolean
The following table describes the Boolean data type.
Values |
Syntax |
Data Size (Not Null, Uncompressed) |
---|---|---|
|
When loading from CSV, |
1 byte, but resulting average data sizes may be lower after compression. |
Boolean Examples
The following is an example of the Boolean syntax:
CREATE TABLE animals (name TEXT, is_angry BOOL);
INSERT INTO animals VALUES ('fox',true), ('cat',true), ('kiwi',false);
SELECT name, CASE WHEN is_angry THEN 'Is really angry!' else 'Is not angry' END FROM animals;
The following is an example of the correct output:
"fox","Is really angry!"
"cat","Is really angry!"
"kiwi","Is not angry"
Boolean Casts and Conversions
The following table shows the possible Boolean value conversions:
Type |
Details |
---|---|
|
|
|
|