Creating a table with a MUL column
MUL is displayed when you use the DESCRIBE statement to get information on a table. MUL simply means that an index...
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
allows non-unique values to be present. Even if a column has a UNQIUE key, it can still be designated MUL if NULL values are allowed (since you could have multiple NULL values in the column).
So to create a table that will have a column that is MUL, just declare it to have a non-unique index, or a unique index that allows NULL values:
mysql> CREATE TABLE mul_test( -> mul_column INT UNSIGNED, -> INDEX(mul_column) -> ); Query OK, 0 rows affected (0.01 sec) mysql> DESCRIBE mul_test; +------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+-------+ | mul_column | int(10) unsigned | YES | MUL | NULL | | +------------+------------------+------+-----+---------+-------+ 1 row in set (0.00 sec)