MYSQL分享:获取缺失主键表信息语句_MySQL
Jun 01, 2016 pm 01:34 PMbitsCN.com
MYSQL分享:获取缺失主键表信息语句
[sql]
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 ;
bitsCN.com

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to remove author and last modified information in Microsoft Word

How to share contact details with NameDrop: How-to guide for iOS 17

How to get the GPU in Windows 11 and check the graphics card details

The single-view NeRF algorithm S^3-NeRF uses multi-illumination information to restore scene geometry and material information.

What's the reason for the delay in receiving messages on WeChat?

How NameDrop works on iPhone (and how to disable it)

iOS 17 NameDrop: How to Easily Share Your Contact Information on iPhone

How to read a photo's aperture range information using PHP and the Exif extension
