MySQL:實(shí)例:查詢一個(gè)數(shù)據(jù)庫(kù)的所有非空表,并按所含記錄數(shù)降序排列扑毡;
select table_schema,table_name,table_rows from information_schema.tables where table_schema='數(shù)據(jù)庫(kù)名' and table_rows!=0 order by table_rows desc
PS:
str_repalce的應(yīng)用舉例
MySQL:實(shí)例:查詢一個(gè)數(shù)據(jù)庫(kù)的所有非空表,并按所含記錄數(shù)降序排列扑毡;
select table_schema,table_name,table_rows from information_schema.tables where table_schema='數(shù)據(jù)庫(kù)名' and table_rows!=0 order by table_rows desc
PS: