sueirnaa Posted May 20, 2010 Share Posted May 20, 2010 how do i set my numbering in ID field to be auto generate?..i ve already set my so that auto increment..but when i delete 1 record...let's say record number 2;it will be appears like this in my table ........................................No | Name | Address | 1 John US3 Mike M'siano 3, suppose to be no. 2. coz the no 2 has been deleted.Help me to solve this problem. Link to comment Share on other sites More sharing options...
chibineku Posted May 20, 2010 Share Posted May 20, 2010 That's the standard behaviour, and as such isn't a problem unless it's important to you specifically. I don't think there are any neat automatic ways of fixing it. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 20, 2010 Share Posted May 20, 2010 It's generally much more desirable to not renumber everything when you do a delete. If you had 10 rows, for example, and deleted row 3, would you want to renumber all of the other rows to close that gap? What if you had other tables that used the same IDs to link to records in this table? Do you want to have to update all of your tables every time you delete a record? Link to comment Share on other sites More sharing options...
ASSIST Posted May 23, 2010 Share Posted May 23, 2010 how do i set my numbering in ID field to be auto generate?..i ve already set my so that auto increment..but when i delete 1 record...let's say record number 2;it will be appears like this in my table ........................................No | Name | Address | 1 John US3 Mike M'siano 3, suppose to be no. 2. coz the no 2 has been deleted.Help me to solve this problem. Link to comment Share on other sites More sharing options...
ASSIST Posted May 23, 2010 Share Posted May 23, 2010 This page will help you:http://www.w3schools.com/sql/sql_autoincrement.aspBrgrds, Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.