What does the COUNT() function return in DB2?

  • The average of all values
  • The number of non-null values
  • The number of rows returned
  • The sum of all values
The COUNT() function in DB2 returns the number of non-null values in a column. It is important to note that COUNT(*) returns the number of rows returned, while COUNT(column_name) returns the number of non-null values in that column. This function is often used to count the number of records that meet certain criteria in a database query. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *