MySQL查询数据库中没有主键的表
-
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'
-
);
名称栏目:MySQL查询数据库中没有主键的表
网站URL:
http://jkwzsj.com/article/pdhgpg.html