Sunday, January 24, 2016

SQL COUNT *: Count The Number of Rows in a Certain Table

Another arithmetic function other than SUM is COUNT. The purpose of COUNT is to return the number of rows found in a certain column.

For example, if we want to count how many sales transaction are there in our SALES table, found below, we will used the query below.








Query
select COUNT(*) from sales

Output





The output is 3 since there are only 3 sales transaction in our SALES table.

SQL COUNT *: Count The Number of Rows in a Certain Table

SQL COUNT *: Count The Number of Rows in a Certain Table Rating: 4.5 Diposkan Oleh: Emoblazz

0 comments:

Post a Comment