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 
/home/content/04/10623904/html/pages/
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/content/04/10623904/html/pages/
how-to-find-auto_increment-fileds-value-in-mysql-table/index.php on line 69

Tags : #MySQL #AutoIncrement #Table #Sql






Recent Posts:
Hello there!,

You are using AdBlocker!

I am an independent developer trying to help fellow developers and students to resolve issues faced on a day-to-day basis, we 'Code to Care' . There is a lot of expenses involved in hosting and managing a website that's the reason we have ads.

A humble request to you to disable adBlocker on Code2care.org and support us pay our bills.

Thanks,
Cod2ecare - Line's of code for change.

To see contents reload page after unblocking
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, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.