Some considerable point about COUNT() in SQL Server :-
Lets have an example :-- It comes under aggregate function.
- It returns number of item in group.
- The return type of COUNT() is "INT".
- COUNT(*) returns the number of values in a group, doesn't matter values includes "NULL" or duplicates.
- COUNT(<ColumnName>) returns the number of nonnull values.
- COUNT(DISTINCT <ColumnName>) returns the number of unique, non-null values.
No comments:
Post a Comment