abonnement Unibet Coolblue Bitvavo
  zondag 22 oktober 2006 @ 15:02:31 #301
120967 the_jasper
Karnemelk, shaken not stirred
pi_42887042
quote:
For those that are looking to "reset" the auto_increment, say on a list that has had a few deletions and you want to renumber everything, you can do the following.

DROP the field you are auto_incrementing.
ALTER the table to ADD the field again with the same attributes.

You will notice that all existing rows are renumbered and the next auto_increment number will be equal to the row count plus 1.

(Keep in mind that DROPping that column will remove all existing data, so if you have exterior resources that rely on that data, or the numbers that are already there, you may break the link. Also, as with any major structure change, it's a good idea to backup your table BEFORE you make the change.)
van de mysql reference pagina

maar hoe doe je dit?
dat eerste lukt me nog wel maar de 2e wil niet
hij geeft dan errors
Wat zegt hij nou.... Dat kan toch niet?
abonnement Unibet Coolblue Bitvavo
Forum Opties
Forumhop:
Hop naar:
(afkorting, bv 'KLB')

Het lijkt erop dat je onze advertenties blokkeert

Dat begrijpen we, maar is wel erg jammer. Je kunt FOK! namelijk wel gratis LEZEN, maar we kunnen FOK! niet gratis MAKEN. De inkomsten van de advertenties zorgen ervoor dat we de kosten van de site kunnen dragen zodat je ook morgen FOK! nog kunt bezoeken.

Zou je willen overwegen om voor FOK! een uitzondering te maken in je adblocker (of andere middelen die onze ads blokkeren)? Je krijgt deze melding dan nooit meer te zien.

Ja, ik wil fok.nl whitelisten, laat me zien hoe

Ik neem liever een premium account zodat ik geen advertenties hoef te zien (je moet eerst inloggen)
Ja, breng me naar de shop