DEV Community

Sachin Ghatage
Sachin Ghatage

Posted on

Find the difference

1)SELECT COUNT(*) FROM Employee;
2)SELECT COUNT(ManagerId) FROM Employee;

First statement counts all the records including nulls

Second statement counts only non null records

Difference is small but very much important

Top comments (0)