Reputation: 42773
When in column must be stored only 2 values: 0
or 1
,
What is the best column type choice for this column: "char"
or ENUM('0', '1')
?
Upvotes: 0
Views: 83
Reputation: 656942
As mentioned in the comments, this should be neither char
nor enum
, but a boolean
.
FALSE
translates to 0
.
TRUE
translates to1
.
If you want to disallow NULL
values define the column NOT NULL
.
Upvotes: 1