Count table rows

DJ. picture DJ. · Dec 12, 2009 · Viewed 285.9k times · Source

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

Answer

Gregory Pakosz picture Gregory Pakosz · Dec 12, 2009
SELECT COUNT(*) FROM fooTable;

will count the number of rows in the table.

See the reference manual.