Arthur Fuller
artful at rogers.com
Sun Dec 12 23:11:52 CST 2004
There may be a dozen ways, but one obvious one is to run this statement:: SHOW CREATE TABLE mytable; and either pipe the result to a text file or just copy the result and paste it into a text editor. Then edit said file and run the SQL, creating myNewTable with the PK of your choice. Finally: INSERT INTO myNewTable SELECT * FROM mytable You probably wouldn't want to use * but you get the idea. HTH, Arthur Paul Rodgers wrote: >Is there a simple way to rename a Primary Key column in MySql, please? None >is listed in my tutorials. > >One way might be to delete the column and add a replacement. But once >records are introduced, it seems, I can't replace a Primary Key column. Be >grateful for guidance from one of our gurus please. > >Is there a simple way to back-up a table in MySql? I keep getting caught out >by forgetting WHERE and messing up masses of rows. > >Cheers > >paul > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 12/9/2004