mysql 查询数据库中没有主键的表
来源:互联网 发布:淘宝主图怎么优化 编辑:程序博客网 时间:2024/05/20 14:17
select table_schema,table_name from information_schema.tables
where (table_schema,table_name) not in(
select distinct table_schema,table_name from information_schema.columns where COLUMN_KEY='PRI'
)
and table_schema not in (
'sys','mysql','information_schema','performance_schema'
);
linux技术交流群:295294329
阅读全文