How to drop or disable Auto_Increment Property of column in MySQL Table - MySQL Developer Tutorial

How to drop or disable Auto_Increment Property of column in MySQL Table

Let's say that you have created auto increment on a column in MySQL table. You need to disable or remove it. You don't want to drop the column but moving forwarding you don't need to have auto increment, instead you would like to insert the values in column manually.

To disable or remove the auto increment from a column in MySQL Table, you can simply Modify the column with same data type but without auto_increment clause.

Let's say if I have customer table with auto increment column "idcustomer" and I would like to remove the auto increment property or feature, I can use below syntax.

ALTER TABLE customer 
modify idcustomer int(11);

The idcustomer column was already int(11) , I used the statement to modify the column so Auto increment can be dropped.

Drop or disable auto increment property of column in MySQL Table - MySQL Tutorial

1 comment:

  1. As you might already know that CIBIL score is just a 3 digit number which is used to explain your past financial and credit history that is taken into consideration by loan facilities, banks and everyone when you look to fetch for a loan, credit and more. How To Improve CIBIL Score Immediately If you check CIBIL Score range valued from 300 to 900 where having 300 will expect you for rejection for a loan or credit card you might apply for. If you simply improve your score to near 900 then your chances of getting better credit out in the market will improve vastly.