
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to display the Engine of a MySQL table?
To know whether a MySQL table is using MyISAM or InnoDB engine then you can use below syntax.
The below syntax can be used for multiple tables −
show table status from yourDatabaseName;
Here is the syntax that can be used for a specific table i.e. to know the engine of a table −
show table status from yourDatabaseName Like ‘yourTableName’.
The following is the query to display engine of all the tables −
mysql> show table status from sampleTest;
The following is the output −
+--------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +--------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ | datetimedemo | InnoDB | 10 | Dynamic | 0 | 0 | 16384 | 0 | 0 | 0 | NULL | 2018-12-05 09:22:54 | NULL | NULL | utf8mb4_0900_ai_ci | NULL | | | | primarydemo | InnoDB | 10 | Dynamic | 0 | 0 | 16384 | 0 | 0 | 0 | NULL | 2018-12-05 09:23:34 | NULL | NULL | utf8mb4_0900_ai_ci | NULL | | | | student | MyISAM | 10 | Dynamic | 0 | 0 | | 281474976710655 | 1024 | 0 | 1 | 2018-12-05 09:22:22 | 2018-12-05 09:22:23 | NULL | utf8mb4_0900_ai_ci | NULL | | | +--------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ 3 rows in set (0.19 sec)
The following is the query to display engine type for a specific table −
mysql> show table status from sampletest Like 'student';
The following is the output that displays the engine for only “student” table −
+---------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +---------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ | student | MyISAM | 10 | Dynamic | 0 | 0 | 0 | 281474976710655 | 1024 | 0 | 1 | 2018-12-05 09:22:22 | 2018-12-05 09:22:23 | NULL | utf8mb4_0900_ai_ci | NULL | | | +---------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+ 1 row in set (0.00 sec)
- Related Articles
- How to create a MySQL table with InnoDB engine table?
- How to create a MySQL table with MyISAM engine table?
- How to alter the database engine of a MySQL database table?
- How to change Table Engine in MySQL?
- How to update MySQL table storage engine
- How to display all the tables in MySQL with a storage engine?
- How can I change the storage engine of a MySQL table?
- How to display the storage engine while implementing JDBC - MySQL CONNECTION query?
- How to display all tables in MySQL with InnoDB storage engine?
- MySQL - changing table engine from innoDB to MyISAM?
- MySQL query to display structure of a table
- How to display all constraints on a table in MySQL?
- While creating a MySQL table, how can I specify the storage engine of my choice rather than using the default storage engine InnoDB?
- How to display MySQL Table Name with columns?
- MySql how to display the records with latest ID in a table?

Advertisements