Databases :: MySql :: "safe" using autoincrement as primary key |
|||
| By: Squibi |
Date: 11/04/2003 00:00:00 |
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 | 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 | Type : Comment |
|
| thanks for the input! |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








