Re: Auto-Increment Values in Mysql

2011-02-09 Thread Jan Steinman
> From: Adarsh Sharma > > I have an auto-increment column in Mysql database table. Let's say the column > has below values : I'll echo what others have said. Auto-increment is typically used to generate unique primary keys. If this column is your primary key, DO NOT change its value! PK = ide

Re: Auto-Increment Values in Mysql

2011-02-09 Thread Reindl Harald
You do not want this really from the point you understood what a primary key does in a database The PRIKEY is unqiue for a record and if the record does no longer exist his PRIKEY must never return Sample: * website * shop-products * you have prodid 500 costs 200$ * you delete the product * there

Re: Auto-Increment Values in Mysql

2011-02-09 Thread Mark Goodge
On 09/02/2011 11:41, Adarsh Sharma wrote: Dear all, I have an auto-increment column in Mysql database table. Let's say the column has below values : 1 2 3 4 5 6 7 8 9 10 Now if i deleted some rows where id= 3 ,5 and 8 The data look like as : 1 2 4 6 7 9 10 I want to have it id's as 1 2 3

Auto-Increment Values in Mysql

2011-02-09 Thread Adarsh Sharma
Dear all, I have an auto-increment column in Mysql database table. Let's say the column has below values : 1 2 3 4 5 6 7 8 9 10 Now if i deleted some rows where id= 3 ,5 and 8 The data look like as : 1 2 4 6 7 9 10 I want to have it id's as 1 2 3 4 5 6 7 and next data is inserted right