Search code examples
mysql

Count table rows


What is the MySQL command to retrieve the count of records in a table?


Solution

  • SELECT COUNT(*) FROM fooTable;
    

    will count the number of rows in the table.

    See the reference manual.