Consider the following SQL Queries executed on the relation Employee:
Employee (Eid, Ename, sal)
Eid is the primary key
S1:SELECT count (*) FROM Employee;
S2: SELECT count (Eid) FROM Employee;
Will these queries return the same result or different results?
According to me, these queries should return same values.
But my solution manual claims that the values returned should be different. It says that S1 will also include results where Eid field is empty.
But according to me, the primary key field can never be empty. So, there will never be a case where Eid field will be empty. As this field will never be empty, the output of S1 and S2 should be equal.
Can anyone please tell me whether I am correct? If not, please tell me what I am doing wrong.
Thanks in advance!