id INT PRIMARY KEY question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

id INT PRIMARY KEY question

Post by jaymoore_299 »

Is there a way to delete a particular primary key in the middle of a table then re-sort them so that there are no gaps between numbers?

I'm not exactly sure when to use id INT. On what kind of data would one need such an index, and on what kind of data could one neglect its use?

Is it easier to delete rows (without making as many mistakes such as deleting the wrong row) with the use of this index?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

multiposting is not cool.
Post Reply