方式一:
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';