Viewing Table Statistics

Function

This statement is used to view the table statistics.

Syntax

1
DESCRIBE [EXTENDED|FORMATTED] [db_name.]table_name;

Keyword

  • DESCRIBE: displays the names and data types of all columns in a specified table.
  • EXTENDED: displays all metadata of the specified table. It is used during debugging in general.
  • FORMATTED: displays all metadata of the specified table in a form.

Precautions

The to-be-queried table must exist. If this statement is used to query the information about a table that does not exist, an error is reported.

Example

To query the names and data types of all columns in the student table, run the following statement:

1
DESCRIBE student;