Ideally Count(*) will count no of rows in which atleast one column is Non NULL otherwise discard that row. Is this statement true?
But when I am trying practically it is returning the count including the null tuple where all columns are null. Can someone pls explain what should be the actual interpretation? And what should be the possible ans for Gate?
create table stud(id int, grade varchar(20));
insert into stud values(1, 'A');
insert into stud values(2, 'B');
insert into stud values(3, null);
insert into stud values(null, null);
select count(grade) from stud; // Returning 2 rows which is correct
select count(*) from stud; // Returning 4 rows. Is this correct?