Tom
Tom

Reputation: 147

Auto Increment Primary Key Integrity

I have a table with a post column and an auto incrementing id column. My id column is set as primary key. Is it bad practice to delete certain posts causing the id column to become unorganized?

Upvotes: 1

Views: 142

Answers (1)

juergen d
juergen d

Reputation: 204766

A primary key is only for uniquely identifying a record. If you need specific order of your records then use an extra column for that. For instance a datetime column.

Upvotes: 3

Related Questions