《Mysql入门获取缺失主键表信息的MYSQL语句》要点:
本文介绍了Mysql入门获取缺失主键表信息的MYSQL语句,希望对您有用。如果有疑问,可以联系我们。
SELECT a.`TABLE_SCHEMA` AS DB_NAME , a.`TABLE_NAME` , a.`TABLE_ROWS` ,a.`ENGINE` -- , a.*
FROM
information_schema.`TABLES` a
LEFT JOIN information_schema.`TABLE_CONSTRAINTS` b
ON a.`TABLE_NAME` = b.`TABLE_NAME` AND a.`TABLE_SCHEMA` = b.`TABLE_SCHEMA`
WHERE b.`TABLE_SCHEMA` IS NULL
AND a.`TABLE_TYPE` = 'BASE TABLE'
AND a.`TABLE_SCHEMA` NOT IN ('information_schema','test','mysql','performance_schema')
ORDER BY DB_NAME ,a.`TABLE_ROWS` DESC ;
《Mysql入门获取缺失主键表信息的MYSQL语句》是否对您有启发,欢迎查看更多与《Mysql入门获取缺失主键表信息的MYSQL语句》相关教程,学精学透。维易PHP学院为您提供精彩教程。
转载请注明本页网址:
http://www.vephp.com/jiaocheng/14132.html