MySQL: Describe Table

Profile picture for user arilio666

The DESCRIBE statement displays the structure of the table mentioned in the query. It shows the table structure, data types used, column names, constraints, etc.

Mysql can use both desc and description.

Syntax

DESCRIBE TableName;
DESC TableName;

Example

Let us describe our table accounts using DESCRIBE statement.

describe accounts;
desc accounts;

As you can see, it describes the internal structure of the table along with the field used, its type, etc.

Tags