I want to use ENUM feature in table using MySQL.
I have created a table tbl_test having id as primary key and enum_col field as ENUM data type.
CREATE TABLE tbl_test(
id INT NOT NULL AUTO_INCREMENT,
enum_col ENUM('a','b','c') NOT NULL,
PRIMARY KEY ( id )
);
When I try to store single enum value, it got inserted but when I try to store multiple enum values then it throws SQL error.
ERROR:
Data truncated for column 'enum_col' at row 1
Single ENUM value (CORRECT):
INSERT INTO tbl_test(id, enum_col) values(1, 'a');
Multiple ENUM values (FAILED):
INSERT INTO tbl_test(id, enum_col) values(2, 'a,b');
Any idea to store multiple values in ENUM data type ?