方式一:
show create table 表名;
例如:SHOW CREATE TABLE dept;
把Create Table 列的值複製出來:
方式二:
#查看某個庫下所有表使用的存儲引擎
show table status from 庫名;
#查看某個庫下指定表使用的存儲引擎
show table status from 庫名 where name='表名';
例如:
SHOW TABLE STATUS FROM bigdata;
SHOW TABLE STATUS FROM bigdata WHERE NAME='dept'
方式三:
#使用information_schema.tables,【】表示可省略,可以查詢指定庫名,表名,存儲引擎名。
SELECT * FROM information_schema.tables
【WHERE table_schema='庫名' AND table_name='表名' AND ENGINE='存儲引擎名'】;
例如:
SELECT * FROM information_schema.tables WHERE table_schema='bigdata' AND table_name='dept' AND ENGINE='InnoDB';