Hi there,
Can anyone help out with some code to set the AUTO_INCREMENT to 1 for my index column.
Basically I have a table that I want to allow users to navigate through freely either by next/prev buttons or by a find query. At the momemt the query is using the row number as the idendifier because there have been deleted records and the index column is therefore out of sequence.
The navigation would work better if I could use the index column, as the prev/next buttons would then also work properly after the find query.
Anyway, I reckon that I can do this if I delete and re-insert the index column each time a record is deleted, which would guarantee a perfect sequence in the index column.
So how do I ensure that the AUTO_INCREMENT is set to one each time the index column is re-inserted? I've tried the SET_AUTO_INCREMENT() function with no luck. At the moment, each time I re-insert the index column it starts from the next available number and keeps climbing.
Any ideas????