色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

mysql 查詢表,mysql數據庫如何快速獲得庫中無主鍵的表

傅智翔2年前41瀏覽0評論
mysql 查詢表,mysql數據庫如何快速獲得庫中無主鍵的表?

獲取數據庫中除系統庫之外所有無主鍵的表sql如下:

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'

);