Mega Code Archive

 
Categories / MySQL / Table Index
 

Information only about a single column, use a LIKE clause that matches the column name

mysql> mysql> CREATE TABLE item     -> (     ->     id INT UNSIGNED NOT NULL AUTO_INCREMENT,     ->     name CHAR(20),     ->     colors SET('chartreuse','mauve','lime green','puce') DEFAULT 'puce',     ->     PRIMARY KEY (id)     -> ); Query OK, 0 rows affected (0.01 sec) mysql> mysql> mysql> SHOW COLUMNS FROM item LIKE 'colors'\G *************************** 1. row ***************************   Field: colors    Type: set('chartreuse','mauve','lime green','puce')    Null: YES     Key: Default: puce   Extra: 1 row in set (0.01 sec) mysql> mysql> drop table item; Query OK, 0 rows affected (0.00 sec)