Question:
Following are the Differences between count(*) and count(1) in SQL
Answer:
1.COUNT(*) will include NULLS but it counts no.of ROWS in a TABLE,
AND
COUNT(column_or_expression) counts no.of NOT NULL values within a COLUMN.
2.COUNT(*) is depend on full table but COUNT(1) is depend on only one column and both are given same output.
Following are the Differences between count(*) and count(1) in SQL
Answer:
1.COUNT(*) will include NULLS but it counts no.of ROWS in a TABLE,
AND
COUNT(column_or_expression) counts no.of NOT NULL values within a COLUMN.
2.COUNT(*) is depend on full table but COUNT(1) is depend on only one column and both are given same output.