通过 information_schema 的 TABLES 视图与 COLUMNS 进行关联查询:
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', 'information_schema','sys', 'performance_schema');