Mega Code Archive

 
Categories / MySQL / Data Type
 

Use SET to have arbitrary combinations

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> select * from testset; +-------------+ | fontattr    | +-------------+ | bold,italic | +-------------+ 1 row in set (0.00 sec) mysql> mysql> drop table testset; Query OK, 0 rows affected (0.00 sec) mysql>