13.5.4.3. SHOW COLUMNS Syntax
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern']
SHOW COLUMNS displays information about the
columns in a given table. It also works for views.
The FULL keyword causes the output to
include the privileges you have as well as any per-column
comments for each column.
You can use db_name.tbl_name as an
alternative to the
tbl_name FROM
db_name syntax. In other
words, these two statements are equivalent:
mysql> SHOW COLUMNS FROM mytable FROM mydb;
mysql> SHOW COLUMNS FROM mydb.mytable;
SHOW FIELDS is a synonym for SHOW
COLUMNS. You can also list a table's columns with
the mysqlshow db_name
tbl_name command.
The DESCRIBE statement provides information
similar to SHOW COLUMNS. See
Section 13.3.1, “DESCRIBE Syntax”.