DROP TABLE IF EXISTS items;
CREATE TABLE items (
name VARCHAR(255),
colors SET("black",
"dim gray",
"dark gray",
"gray",
"light gray",
"gainsboro",
"white smoke",
"white",
"red",
"orange red",
"dark orange",
"orange",
"gold",
"yellow",
"chartreuse",
"lawn green",
"green",
"spring green",
"medium spring green",
"cyan",
"deep sky blue",
"blue",
"medium blue",
"dark violet",
"dark magenta",
"magenta",
"dark red",
"brown",
"firebrick",
"indian red",
"light coral",
"salmon"),
INDEX (colors)
) DEFAULT CHARSET=utf8;
SHOW CREATE TABLE items;
Table	Create Table
items	CREATE TABLE `items` (
  `name` varchar(255) DEFAULT NULL,
  `colors` set('black','dim gray','dark gray','gray','light gray','gainsboro','white smoke','white','red','orange red','dark orange','orange','gold','yellow','chartreuse','lawn green','green','spring green','medium spring green','cyan','deep sky blue','blue','medium blue','dark violet','dark magenta','magenta','dark red','brown','firebrick','indian red','light coral','salmon') DEFAULT NULL,
  KEY `colors` (`colors`)
) ENGINE=mroonga DEFAULT CHARSET=utf8
INSERT INTO items VALUES ("t-shart", "black,white");
INSERT INTO items VALUES ("hat", "white,dark violet");
INSERT INTO items VALUES ("parka", "green,brown,red");
SELECT * FROM items;
name	colors
t-shart	black,white
hat	white,dark violet
parka	red,green,brown
SELECT * FROM items WHERE colors = "white,dark violet";
name	colors
hat	white,dark violet
DROP TABLE items;
