Okay all you database people out there, I have a question for you about the YesNo column type from App sheetโฆ
What am I supposed to use as the column type in a mySQL database?
Iโve looked this up and Iโve tried several different things, but none of them seem to be working.
Iโm just wondering what others have used before that works?
Two ways:
BIT datatype (see http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html) wich is a numeric datatype. true and false correspond to 1 an 0 respectively
ENUM datatype (see http://dev.mysql.com/doc/refman/5.0/en/enum.html). Defines a list from which only one value must be chosen:
ENUM(โTRUEโ,โFALSEโ) or ENUM(โyesโ,โnoโ)
Hmmmโฆ Tried both of the enum options, neither of those workedโฆ Letโs see about that first one
I have used ENUM before; it goes well, but on the AppSheet side you should set Enum column type with text values being โYesโ and โNoโ.
Using BIT in MySQL could be tricky; I have seen different MySQL clients having issues properly displaying BIT columnโs value, or updating/inserting values in it; sometimes I found they were trying to insert โ1โ or โ0โ in the column, and MySQL returned error; AppSheetโs Yes/No column seems to work as expected though, but if AppSheet is not your only client, and you want to be safe for future integrations and to make sure the column will be universally treated the same way, then I recommend using TINYINT; at least it would be clear for all clients to treat it like a simple integer.
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |