visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: "safe" using autoincrement as primary key


By: Squibi U.S.A.  Date: 11/04/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
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
By: VGR Date: 11/04/2003 18:27:00 English  Type : Answer
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.
By: Squibi Date: 13/04/2003 16:30:00 English  Type : Comment
thanks for the input!

Do register to be able to answer

EContact
browser fav
page generated in 97.062830 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page