[Mysql] reset auto_increment *

Pagina: 1
Acties:
  • 111 views sinds 30-01-2008
  • Reageer

  • Alnitak
  • Registratie: September 2001
  • Laatst online: 20-12-2021
is er een sql commando om de auto_increment waarde te resetten
hij staat nu op (8388607) en dat is een beetje hoog :)

Little known fact about Middle Earth: The Hobbits had a very sophisticated computer network! It was a Tolkien Ring...


  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Als ik eens ga [google=mysql reset auto_increment] met letterlijk jouw topictitel, dan kom ik aardig wat relevante hits (+ oplossingen) tegen ;)

[ Voor 4% gewijzigd door BtM909 op 01-03-2004 12:38 ]

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


  • NMe
  • Registratie: Februari 2004
  • Laatst online: 23:30

NMe

Quia Ego Sic Dico.

Iets ingewikkelder dan de vraag van Alnitak: is het mogelijk een autoincrement op 1 hoger dan de hoogste waarde te zetten? Bijvoorbeeld: je hoogste waarde is 20 en je verwijdert de records 15 t/m 20. Dan staat de auto increment teller nog op 20 of 21 ofzo. Is die terug te krijgen naar 14/15?

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


  • whoami
  • Registratie: December 2000
  • Laatst online: 00:40
Als je een TRUNCATE table doet (ik weet niet of dat bestaat in MySQL), heb je kans dat het gereset wordt.

https://fgheysels.github.io/


  • NMe
  • Registratie: Februari 2004
  • Laatst online: 23:30

NMe

Quia Ego Sic Dico.

TRUNCATE bestaat in MySQL maar volgens mij reset ie de auto_increment niet. Weet het niet zeker though.

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


  • Brons
  • Registratie: April 2002
  • Laatst online: 27-05 12:35

Brons

Fail!

TRUNCATE reset de auto_increment ja.

  • DR
  • Registratie: December 2000
  • Niet online

DR

ALTER TABLE tabel AUTO_INCREMENT =nummertje

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 23:30

NMe

Quia Ego Sic Dico.

MySQL Reference
The table handler may not remember the last used AUTO_INCREMENT value but may start counting from the beginning. This is true for MyISAM, ISAM, and BDB tables.
Maar wat ik vroeg is niet mogelijk?

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


  • koelkast
  • Registratie: Juni 1999
  • Niet online
Met PhpMyAdmin kan het in ieder geval wel.

  • GX
  • Registratie: Augustus 2000
  • Laatst online: 14-05-2025

GX

Nee.

NMe84 schreef op 01 maart 2004 @ 13:29:
MySQL Reference

[...]

Maar wat ik vroeg is niet mogelijk?
Anders kan je altijd nog moeilijk doen en de MAX() functie gebruiken.
Pagina: 1