MySQL Describe Table (original) (raw)

Last Updated : 14 Mar, 2026

The DESCRIBE TABLE statement, also written as DESC or DESCRIBE, is used in MySQL to view the structure of a table. It displays important details about table columns and their properties such as data types, nullability, default values, and key constraints.

**Syntax:

DESCRIBE table_name;

This command returns information about the structure of the specified table.

Output Columns of DESCRIBE Statement

The output of the DESCRIBE statement includes the following columns:

Display Table Information in MySQL Workbench

MySQL Workbench also allows users to view table structure through a graphical interface.

Follow these steps to inspect a table:

Step 1: Open MySQL Workbench

Launch MySQL Workbench and connect to your database server.

Step 2: Locate the Database

In the Navigator panel on the left side, expand the database that contains the table.

Step 3: Open the Tables Section

Click on the Tables section to display all tables available in the selected database.

Step 4: Inspect the Table

Right-click the table you want to inspect and select Table Inspector to view detailed table information.

This will display column details, indexes, and other structural information about the table.

Working with DESCRIBE TABLE

Assume we have two tables named students and fees with several columns. We can use the DESCRIBE command to view the structure of these tables.

1. DESCRIBE Students Table

Run the following query:

**Query:

DESCRIBE students;

**Output:

MyqlDescribeTable1

Describing student table

The output provides detailed information about each column in the table.

2. DESCRIBE Fees Table

Now run the following query to view the structure of the fees table:

**Query:

DESCRIBE fees

**Output:

MyqlDescribeTable2

Describing fees table

The output provides the following details about the table columns.

MySQL SHOW COLUMNS Command

Another way to retrieve table structure information in MySQL is by using the SHOW COLUMNS command.

**Query:

SHOW COLUMNS FROM student;