Bases de données :: MySql :: "safe" using autoincrement as primary key |
|||
| Par : Squibi |
Date : 11/04/2003 00:00:00 |
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 | 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 | Type : Commentaire |
|
| thanks for the input! |
|||
|
Inscrivez-vous pour répondre |
|||
| Add This Article To: | |||
| |
|
|
|
| |
|
|
|








