List:General Discussion« Previous MessageNext Message »
From:David Lloyd Date:August 17 2002 3:41am
Subject:Re: auto increment as primary key
View as plain text  

[ mysql, query ]

> Is it a good idea to use an auto increment field as a primary key in mysql?
> I know in some products like paradox it is a bad idea because of possible
> corruption problems down the road?

I don't believe there would be any problems in the latest versions of
MySQL; obviously you're not going to be manually resetting the index
manually. Just remember, that primary keys really aren't reusable so
choose a column type that will be sufficient for your purposes.

Something like:

id int unsigned not null auto_increment primary key

auto increment as primary keyFr. Robert Bower17 Aug
  • Re: auto increment as primary keyDavid Lloyd17 Aug
  • Re: auto increment as primary keyDan Nelson17 Aug