1. 检查存储引擎
SELECT TABLE_TYPE,ENGINE,count(*) FROM
information_schema.tables WHERE table_schema='jcdb' GROUP BY TABLE_TYPE,ENGINE;
2. 表主键检查
SELECT count(table_name)
FROM information_schema.tables
WHERE table_schema = 'jcdb'
AND table_name NOT IN (
SELECT table_name
FROM information_schema.table_constraints
WHERE constraint_type = 'PRIMARY KEY'
);