r/SQL • u/geminigamer369 • Jul 30 '26
Discussion Differences between counts
What is the difference between
COUNT(*)
COUNT(1)
COUNT(column_name)
8
Upvotes
r/SQL • u/geminigamer369 • Jul 30 '26
What is the difference between
COUNT(*)
COUNT(1)
COUNT(column_name)
View all comments
Show parent comment
1
u/Zestyclose-Turn-3576 Jul 30 '26
There's really no reason to think that the database developers haven't spotted that there are potentially many ways to do count(*), so they do the most efficient way.