•
QUERY CACHE
Removes all query results from the query cache.
•
SLAVE
Makes the slave forget its replication position in the master binary logs. Also resets the relay log by
deleting any existing relay log files and beginning a new one.
13.8. MySQL Utility Statements
13.8.1.
DESCRIBE
The
DESCRIBE
structure or query execution plans. For more information, see
13.8.2.
EXPLAIN
{EXPLAIN | DESCRIBE | DESC}
tbl_name [col_name
{EXPLAIN | DESCRIBE | DESC}
[EXTENDED] SELECT
The
DESCRIBE
often used to obtain information about table structure, whereas
execution plan (that is, an explanation of how MySQL would execute a query). The following discussion
uses the
DESCRIBE
treats them as completely synonymous.
Obtaining Table Structure Information
provides information about the columns in a table. It is a shortcut for
DESCRIBE
FROM. As of MySQL 5.0.1, these statements also display information for views. (See
"SHOW COLUMNS
can be a column name, or a string containing the SQL "%" and "_" wildcard characters to
col_name
obtain output only for the columns with names matching the string. There is no need to enclose the
string within quotation marks unless it contains spaces or other special characters.
mysql>
DESCRIBE City;
+------------+----------+------+-----+---------+----------------+
| Field
+------------+----------+------+-----+---------+----------------+
| Id
| Name
| Country
| District
| Population | int(11)
+------------+----------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
The description for
Section 13.7.5.5,
If the data types differ from what you expect them to be based on a
that MySQL sometimes changes data types when you create or alter a table. The conditions under
which this occurs are described in
The
DESCRIBE
The
SHOW CREATE
information about tables. See
MySQL Utility Statements
Syntax
and
statements are synonyms, used either to obtain information about table
EXPLAIN
Syntax
| wild]
select_options
and
statements are synonyms. In practice, the
EXPLAIN
and
keywords in accordance with those uses, but the MySQL parser
EXPLAIN
Syntax".)
| Type
| Null | Key | Default | Extra
| int(11)
| NO
| PRI | NULL
| char(35) | NO
|
| char(3)
| NO
| UNI |
| char(20) | YES
| MUL |
| NO
|
SHOW COLUMNS
"SHOW COLUMNS
Syntax").
Section 13.1.10.3, "Silent Column Specification
statement is provided for compatibility with Oracle.
TABLE,
SHOW TABLE
Section 13.7.5,
| auto_increment |
|
|
|
|
| 0
|
provides more information about the output columns (see
STATUS, and
SHOW INDEX
"SHOW
Syntax".
1210
Section 13.8.2,
"EXPLAIN
DESCRIBE
is used to obtain a query
EXPLAIN
SHOW COLUMNS
|
|
|
|
|
CREATE TABLE
Changes".
statements also provide
Syntax".
keyword is more
Section 13.7.5.5,
statement, note
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers