Jump to content

Get total number of rows


Utherr12

Recommended Posts

How do I get the total number of rows without actually selecting everything in the table? I want to get the total number of rows in a table to use it in PHP, it's a big table with ~200k rows (i can see that using heidisql) and i don't want to do SELECT * because that would be very inefficient.

Link to comment
Share on other sites

SELECT COUNT(*) as totalrow FROM table1;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...