mysql 查詢數據庫 有某個字段的所有表,並有記錄行數

SELECT co.table_name,tb.table_rows FROM information_schema.columns co
LEFT JOIN information_schema.tables tb ON tb.table_name = co.table_name
WHERE co.column_name='openid' and tb.table_rows >0 ORDER BY tb.table_rows DESC

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章