Truy vấn INFORMATION_SCHEMA.TABLES lọc ENGINE='InnoDB', loại trừ database hệ thống.
Truy vấn
mysql> SELECT TABLE_SCHEMA AS DATABASENAME, TABLE_NAME AS AllTABLENAME, ENGINE AS ENGINETYPE
-> FROM INFORMATION_SCHEMA.TABLES
-> WHERE ENGINE = 'InnoDB'
-> AND TABLE_SCHEMA NOT IN ('mysql','information_schema','performance_schema');
Kết quả trả về 194 bảng (rút gọn):
+--------------+------------------------------------------------------------------+------------+ | DATABASENAME | AllTABLENAME | ENGINETYPE | +--------------+------------------------------------------------------------------+------------+ | sys | sys_config | InnoDB | | business | mytable, primarytable, tblstudent, modifydatatype, nulldemo, ... | InnoDB | | sample | mytable, yourtable | InnoDB | | education | university, student | InnoDB | | test | destination, originaltable, myisamtoinnodbdemo | InnoDB | +--------------+------------------------------------------------------------------+------------+ 194 rows in set (0.01 sec)