且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

计算表中的行数

更新时间:2023-02-06 10:08:03

我总是做完

SELECT count(*) FROM table

以上将为您提供所有行的总数.

The above will you give you the total count of all rows.

您可以轻松地附加WHERE子句以获取某些子集的计数

You could just as easily tack on a WHERE clause to get the count of some subset

SELECT count(*) FROM table WHERE foo = 'bar'