sql - MySQL data type for a field with only two possible options -
i'm trying work out data type use field in database can 1 of 2 options: 'dual' or 'solo'.
i realise boolean can't use tinyint(1) because inputs not numbers.
if give me idea of use in situation appreciated :)
you can use enum
colname enum('dual', 'solo') internally stored tinyint, when storing , retrieving use strings.
or use tinyint. terms "dual" , "solo" refer 2 , 1 participants, have
participants tinyint(1) and store 1 solo , 2 dual.
Comments
Post a Comment