Select only one value among the set
mysql>
mysql>
mysql> CREATE TABLE testset
-> (fontattr SET ('bold', 'italic', 'underlined'));
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> INSERT testset VALUES ('bold,italic');
Query OK, 1 row affected (0.00 sec)
mysql>
mysql>
mysql> SELECT * FROM testset WHERE fontattr='italic';
Empty set (0.00 sec)
mysql>
mysql> drop table testset;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category