Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Suppose I have a relation R
How many tuples are returned by SQL query
SELECT distinct manager
Is it $2$ or $4$ ?
You will get 2 records, with value 2 and null
NULL is still a value when it comes to distinct, but it is not included if you do a count, so
select count(manager) from r;
would just return a count of 1