Mysql Trivia

mysql

Is there any differences between COUNT(1) and COUNT(*)?

Probably not. To determine the number of rows inside a table we can use:

SELECT COUNT(1) FROM tableName;
SELECT COUNT(*) FROM tableName;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License