|Igor Tandetnik wrote:
   | On 1/30/2014 7:20 PM, James K. Lowden wrote:
   |or define a constraint
   |
   |    colname boolean check (colname in ('Y', 'N'))
   |
   |Of course you can use 0 and 1, but there's no technical advantage

|There is a tiny advantage. Values 0 and 1 are special-cased in SQLite's file 
format, and occupy only one byte each. 'Y' and 'N' require two bytes to 
represent.

Since SQLite uses at least 8 bits there is enough space for three values: 
False, True, Undefined. One has to define standard values. 
For example -1 for false, 0 for undefined, all others for true. YMMV. Using a 
letter has the advantage of being more explicit.  

Kind regards,
Klaas `Z4us` V

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to