Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
获取 MySQL 数据库中特定表中总行数的语法是什么?
我一直做
SELECT count(*) FROM table
以上将为您提供所有行的总数。
您可以轻松地添加 WHERE 子句来获取某个子集的计数
SELECT count(*) FROM table WHERE foo = 'bar'
SELECT count(*) FROM table_name