-
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'
-
);
本文標(biāo)題:MySQL查詢數(shù)據(jù)庫中沒有主鍵的表
網(wǎng)頁地址:
http://weahome.cn/article/pdhgpg.html