On 21-Mar-01 roger westin wrote:
> Hi there,
> Question:
> Whats the Easiest way to insert an AUTO_INCREMENT column into an existing
> table,
> the new field will take over the primary key and the index.
>
>
alter table da_table drop primary key, drop old_id;
alter table da_table add id int not null auto_increment primary key first;
Regards,
--
Don Read [EMAIL PROTECTED]
-- If you are going to sin, sin against God, not the bureaucracy.
God will forgive you but the bureaucrats won't.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php