Issue with resetting auto increment from default to big number
Posted
by
Sai Srikanth
on Server Fault
See other posts from Server Fault
or by Sai Srikanth
Published on 2012-09-06T01:27:32Z
Indexed on
2012/09/06
3:39 UTC
Read the original article
Hit count: 584
I have a MySQL table naming Invoice for a Inventory Monitoring site, invoice_number is bigint(19) AUTO_INCREMENT field.
Currently AUTO_INCREMENT value is 1.
Client want it to start the invoice_number from 50000. With the following script reset the ALTER TABLE INVOICES AUTO_INCREMENT = 50000; When I wrote an Insert Script to insert data in SQLDBX, it is putting the invoice_number from 50000. But when i am trying to do insert a record using the application(web application), the invoice_number value is starting from 1. We are making use of Spring-JDBC template to insert data into mysql database.
© Server Fault or respective owner