|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
mySQL auto_increment problem after field type change
Hi,
Because my database has grown larger than I had originally expected, I needed to change the field type for sid (sid bigint(20)) to bigint from smallint. This field is also auto_increment. When I try to add another record however, it tries to start from 0 again, and of course gives an error of duplicate entry. Any ideas? Thanks, Richard |
|
#2
|
|||
|
|||
|
From the manual (ALTER TABLE):
For MyISAM tables, you can set the first sequence number by executing SET INSERT_ID=value before ALTER TABLE or by using the AUTO_INCREMENT=value table option |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > mySQL auto_increment problem after field type change |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|