April 2008
Intermediate to advanced
566 pages
21h 55m
English
DESCRIBE
{DESCRIBE|DESC} table [column]This statement displays information about the columns of a
given table. The DESCRIBE keyword can be
abbreviated to DESC:
DESCRIBE workreq; +--------------------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------+---------+------+-----+---------+----------------+ | req_id | int(11) | NO | PRI | NULL | auto_increment | | client_id | int(11) | YES | | NULL | | | client_description | text | YES | MUL | NULL | | | technician_notes | text | YES | | NULL | | +--------------------+---------+------+-----+---------+----------------+
For information on a specific column, supply only the column
name. For information on multiple columns but not all columns, you can
supply a name pattern within quotes and use the wildcard characters
% and _. Quotes around the string aren’t necessary unless the
string contains spaces.
To list the columns in the workreq table that
have names beginning with the characters client,
enter the following:
DESCRIBE workreq 'client%'; +--------------------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+---------+------+-----+---------+-------+ | client_id | int(11) | YES | | NULL | | | client_description | text | YES | MUL | NULL | | +--------------------+---------+------+-----+---------+-------+
Notice that the keyword LIKE is not used. The fields in the results have the following meanings: ...
Read now
Unlock full access