Return the number of products in the "Products" table:
SELECT COUNT(ProductID) AS NumberOfProducts FROM Products;
Try it Yourself »
The COUNT() function returns the number of records returned by a select query.
Note: NULL values are not counted.
COUNT(
expression)
Parameter | Description |
---|---|
expression | Required. A field or a string value |
Works in: | From MySQL 4.0 |
---|
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!