Home >> SQL >> Count in SQL

Count in SQL

It will count all rows in that column except null value.

Syntax

SELECT COUNT(columnname) FROM tablename WHERE condition; 

Example

SELECT COUNT(price) AS countprice FROM products;

Post Your Comment

Next Questions
Sum

Copyright ©2022 coderraj.com. All Rights Reserved.