The Question : Based on the above given table named ‘Student’, Satyam has executed following queries: Select count(*) from student; Select count(MARKS) from student; Predict the output of the above given queries. Also give proper justifications of the output generated through each query.
Solution for the question :
First query will produce the output 7.
Justification: count (*) will count and display total number of rows (irrespective of any null value present in any of the column).
Second query will produce the output 6.
Justification: count (col_name) will count and display total number of not null values in the specified column.
The correct answer to the question is researched by our moderators and shared with you. You can give feedback by commenting for the answers you think are wrong.