Not to mention that 0 is false and 1 is true. If you use 1 and 0, then you can write commands like:
select <stuff> from <tables> where isActive; and have it work as you expect. Whereas if isActive contains 'T' or 'F' then the above will not work and you will have to issue the same select as select <stuff> from <tables> where isActive = 'T'; > -----Original Message----- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of Cecil Westerhof > Sent: Thursday, 14 April, 2016 13:53 > To: SQLite mailing list > Subject: Re: [sqlite] Working with booleans > > 2016-04-14 19:49 GMT+02:00 Jay Kreibich <jay at kreibi.ch>: > > > > > On Apr 14, 2016, at 12:42 PM, Cecil Westerhof <cldwesterhof at gmail.com> > > wrote: > > > > > When working with booleans at the moment I use: > > > isActive INTEGER NOT NULL CHECK(isActive in (0, 1)) > > > > > > Is this a good way, or would be using a CHAR with a check op 'T', or > 'F' > > be > > > better? > > > > > > > Integer 1 and 0 will be the most compact representation in the file > format. > > > > ?OK, I will stick with it then. > > -- > Cecil Westerhof > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users