mysql - How to limit Value Range in tinyint(1) field? -
i have table tblproducts.
the table contains field listed tinyint(1) not null default 0
the field can take values between 0-9. is there way in mysql allow 2 values in field: either 1 or 0
you can convert existing column bit(1), example sql
alter ignore table persons modify p_id bit(1) default 0
note: existing values >=1 converted 1;
Comments
Post a Comment