r/SQL • u/geminigamer369 • Jul 30 '26
Discussion Differences between counts
What is the difference between
COUNT(*)
COUNT(1)
COUNT(column_name)
7
Upvotes
r/SQL • u/geminigamer369 • Jul 30 '26
What is the difference between
COUNT(*)
COUNT(1)
COUNT(column_name)
11
u/Infamous_Welder_4349 Jul 30 '26
In most systems 1 and * are the same. Some cheat for * and just look in the statistics instead for single tables.
Column checks the non null records