How to find AUTO_INCREMENT Fields value in MySQL table

If you want to know at any given time what is the next value of an AUTO_INCREMENT filed for a given table in your MySql database then you can get it by running the below query in your phpMyAdmin SQL tab.

Query : show table status like "your_table_name";

You would get a record with details about the queried table like,

Name, Engine, Version, Row_format, Rows, Avg_row_length, Data_length, Max_data_length, Index_length, Data_free, Auto_increment, Create_time, Update_time, Check_time, Collation, Checksum, Create_options, Comment.

Auto increment filed value
Auto increment filed value

The value of Auto_increment filed is the next value that will be used when some record is added to this table.

If you want to change this value, just edit the filed and apply the changes.

Post Date : January 21st 2015

Warning: include(../../php/comment.php) [function.include]: 
failed to open stream: No such file or directory in 
how-to-find-auto_increment-fileds-value-in-mysql-table/index.php on line 69
Warning: include() [function.include]: 
Failed opening '../../php/comment.php' for inclusion (
include_path='.:/usr/local/php5_3/lib/php') in /home/reai46l46b55/public_html/pages/
how-to-find-auto_increment-fileds-value-in-mysql-table/index.php on line 69

Tags : #MySQL #AutoIncrement #Table #Sql

Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.