views:

25

answers:

3

The only way I know is show create table MyTable

A: 
SHOW TABLE STATUS LIKE "tablename";

the auto_increment column will show the count.

Pekka
+2  A: 

You can use LAST_INSERTED_ID function.

Pablo Santa Cruz
A: 
SELECT `AUTO_INCREMENT`
  FROM `information_schema`.`TABLES`
 WHERE `TABLE_SCHEMA` = SCHEMA()
   AND `TABLE_NAME` = 'tbl_name';
dev-null-dweller