MYSQL - count number of rows in each table

后端 未结 3 1495
小鲜肉
小鲜肉 2021-01-31 08:39

I would like to know how many rows are in each table in my database. I\'ve come so far as to having

select count(*) _tablename_; 

However i wou

3条回答
  •  执笔经年
    2021-01-31 09:12

    SELECT table_name, table_rows
        FROM INFORMATION_SCHEMA.TABLES
        WHERE TABLE_SCHEMA = '';
    

    I also hope you realise there's an error in your query: it's missing a FROM.

提交回复
热议问题