Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: mysql auto_incremented id

by cchampion (Curate)
on Dec 17, 2003 at 20:12 UTC ( #315373=note: print w/ replies, xml ) Need Help??


in reply to Re: mysql auto_incremented id
in thread mysql auto_incremented id

Not sure this is the best solution,

Definitely not.

Removing a primary key and recreating it will break the database referential integrity.

BTW reusing the gaps in the primary key, as the OP wants, is not the smartest move either. I know a couple of methods to achieve that, but I also know half a dozen reasons not to do it. Therefore I'll keep the method for myself.

In the meantime, I will just suggest leaving the primary key alone.


Comment on Re: Re: mysql auto_incremented id
Re: Re: Re: mysql auto_incremented id
by eric256 (Parson) on Dec 17, 2003 at 20:44 UTC

    I understood about the integrity. That would be why I mentioned that normaly keys (ids in this case_ are meant to stay the same and never be changed.


    ___________
    Eric Hodges

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://315373]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-08-31 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls