Home »
MySQL
MySQL DESCRIBE Statement
MySQL | DESCRIBE: Learn about the MySQL DESCRIBE Statement, with its explanation, syntax, and query examples.
Submitted by Apurva Mathur, on September 20, 2022
DESCRIBE Statement / DESCRIBE Table
The DESCRIBE statement in MySQL helps us to see the entire structure of the table. Here structure means what type of constraints are applied on the columns, what data type is used for the column etc. We can view the structure with this command.
DESCRIBE Statement Syntax
DESCRIBE table_name;
For this first thing is to select the database using USE database_name command, after selecting the database use the describe command with the specified table name.
Suppose I have the following databases,
From all the databases I have to USE new_schooldb, and then I will simply write,
After selecting the particular database, now I will see the tables inside this database, using the following command,
Now if I want to know the entire structure of the table named as student details in such case I will write,
DESCRIBE student_details;
As you can see the structure of the table is displayed which gives us information about everything.
DESCRIBE Table / Getting Table Structure in MYSQL Workbench
Step 1: Select the schema, under the schemas section.
Step 2: After selecting the table, select the table (here I am selecting the student_details table).
Step 3: After this go to the information (i) option, as shown in the picture.
Step 4: Then click on columns, and the table structure will be visible.