42.检查mysql数据库中没有创建主键的表的语句

select table_schema,table_name  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','sys','information_schema','performance_schema');

 

posted on 2021-08-14 16:00  太白金星有点烦  阅读(96)  评论(0编辑  收藏  举报

导航