• 查看指定database
select table_schema, table_name,TABLE_TYPE
from information_schema.tables
where table_name not in (select distinct table_name
from information_schema.columns
where column_key = "PRI")
AND table_schema ='transdb' order by TABLE_TYPE,1 ;
• 查看全库
select table_schema, table_name,TABLE_TYPE
from information_schema.tables
where table_name not in (select distinct table_name
from information_schema.columns
where column_key = "PRI")
AND table_schema not in
('mysql', 'information_schema', 'sys', 'performance_schema') order by TABLE_TYPE,1 ;
自己新开的公众号,会不定期分享文章,感兴趣的请关注下: