Get table information in MySQL

The SQL Query examples explained in this post can be used to get the information of a Table created in the MySQL database.

desc table_name;

If you are using a MySQL database to store your data then you must have created one or multiple tables inside it. The table contains multiple columns of different data types and relationships with other tables.

If you want to get the information of any table in a MySQL database then you can use query desc table_name.

For example, if you have a table customer that contains multiple columns and you want to get the information of columns with their data types then you can use the below SQL query.

desc customers;


Was this helpful?