+3 votes
in Class 12 by kratos

There is a column Salary in a Table EMPLOYEE. The following two statements are giving different outputs. What may be the possible reason ?

SELECT COUNT(*) FROM EMPLOYEE;

SELECT COUNT( SALARY) FROM EMPLOYEE;

1 Answer

+3 votes
by kratos
 
Best answer

If there are null values in the salary column alone, then COUNT function will not count those records.

...