How do I know if a mysql table is using myISAM or InnoDB Engine? How do I know if a mysql table is using myISAM or InnoDB Engine? mysql mysql

How do I know if a mysql table is using myISAM or InnoDB Engine?


If you use SHOW CREATE TABLE, you have to parse the engine out of the query.

Selecting from the INFORMATION_SCHEMA database is poor practice, as the devs reserve the right to change its schema at any time (though it is unlikely).

The correct query to use is SHOW TABLE STATUS - you can get information on all the tables in a database:

SHOW TABLE STATUS FROM `database`;

Or for a specific table:

SHOW TABLE STATUS FROM `database` LIKE 'tablename';

One of the columns you will get back is Engine.


SELECT * FROM INFORMATION_SCHEMA.TABLESWHERE TABLE_SCHEMA = 'db name' AND ENGINE != 'InnoDB'


show create table <table> should do the trick.