Name

DESCRIBE

Synopsis

{DESCRIBE|DESC} table [column]

This statement displays information about the columns of a given table. The DESCRIBE keyword can be abbreviated to DESC. For information on a specific column, give the column name or a naming pattern within quotes to include multiple columns. For instance, to display a list of columns in the workreq table that begin with the characters client_, enter the following:

DESCRIBE workreq 'client_%';
+-------------+------------+------+-----+---------+-------+
| Field       | Type       | Null | Key | Default | Extra |
+-------------+------------+------+-----+---------+-------+
| client_id   | varchar(4) | YES  |     | NULL    |       |
| client_type | char(1)    | YES  |     | NULL    |       |
+-------------+------------+------+-----+---------+-------+

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.