Provide the count of products in the “Products” table.
| SELECT COUNT(ProductID) AS NumberOfProducts FROM Products; |
The COUNT() function yields the number of records returned by a select query.
Note: Excluding NULL values from the count.
| COUNT(expression) |
|
Parameter |
Description |
|
expression |
Necessary: A field or a string value is required. |
| Works in: | From MySQL 4.0 |