visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
304 experts, 1182 utilisateurs inscrits, 1626 questions déjà répondues
European Experts Exchange, le meilleur site pour des solutions de qualité

New Improved Search!

 


Le lien vers le DDRK est de nouveau fonctionnel.
Nous avons subi une coupure d'une semaine, désolé.
(23-30/01/2010)

Bases de données :: MySql :: "safe" using autoincrement as primary key


Par : Squibi E.U.A.  Date : 11/04/2003 00:00:00  Anglais  Points: 50 État : Répondue
Qualité : Excellente
hi,

i don't normally like using an autoincrement field in a table. i want to use it now in my site's production table... is it 'safe' to use it as a primary key of a table..? i don't like this autoincrement, because it gets confused once you start deleting records in the table it seems to me ?

thanks
Par : VGR Date : 11/04/2003 18:27:00 Anglais  Type : Réponse
not at all, it's 100% safe and clean.

use it preferably to PRI KEYs and such

when lines are deleted, their number is NOT used for the next insertion. The sequence continues normally (unless you take specific actions), and no need to OPTIMIZE TABLE either.
Par : Squibi Date : 13/04/2003 16:30:00 Anglais  Type : Commentaire
thanks for the input!

Inscrivez-vous pour répondre

 Add This Article To:
 del.icio.usDel.icio.us  diggDigg  googleGoogle  spurlSpurl
 blinkBlink  wongWong  simpySimpy  yahooY! MyWeb 
EContact
browser fav
page générée en 42.163130 millisecondes

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page