I have a table TBLPRODUCTS.
The table contains a field listed tinyint(1) not null default 0
The field can take values between 0-9. Is there a way in mysql to allow only two values in this field: either 1 or 0
I have a table TBLPRODUCTS.
The table contains a field listed tinyint(1) not null default 0
The field can take values between 0-9. Is there a way in mysql to allow only two values in this field: either 1 or 0
you can convert existing column to BIT(1), example sql
ALTER IGNORE TABLE Persons MODIFY P_Id BIT(1) DEFAULT 0
Note: all existing values >=1 will be converted to 1;