Sounds like a basic question but I couldn't seem to find it.
Is there a way to define in SQLite
a column which will be a single bit
?
Is it possible to define bit column in sqlite? [duplicate]
No.
SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true).
I guess it is because, internally sqlite takes only required amount of memory and it is optimized in that way, So, an Integer field holding value 0 or 1 will only take 1 byte. –
Eastwards
They could save space by joining the result of 8 rows boolean values and saving them as a byte... but looks like nobody cared –
Indivertible
AS at 2021-01-20, I should say YES, you can define bit datatype in SQLite and it's working.
Your answer is incorrect, sqlite contains boolean, but boolean is not true/false, it is any boolean number. OP is asking for a single bit. –
Infamy
© 2022 - 2024 — McMap. All rights reserved.