Well whatever you do to fix the problem, I would practice on a copy of the database first, just to make sure that any alterations to the tables are exactly what you want to happen.
When you are 100% sure you know how to solve the problem, then you know it is safe to make the changes to the live database itself. Do you have the show create table xyz /G output for the tables you want to alter please? Regards Keith Roberts In theory, theory and practice are the same; in practice they are not. On Tue, 9 May 2006 [EMAIL PROTECTED] wrote: > To: mysql@lists.mysql.com > From: [EMAIL PROTECTED] > Subject: customer id - made the worst possible way > > hi to all, > I have to redo a web site of one company and the structure of the current > db is a little mess. > one of them is customer id number. right now, customer table use as > primary key cust_id column varchar(50) PRIMARY KEY (no auto increment). I > really have no idea why previous developer made cust_id with letter C on > the beggining of a number, and the number is made from date, (mdyHis) ?!?! > > What do you suggest to do: > 1. take off letter C and keep the numbers, change cust_id to integer NOT > NULL, add one customer with number 20000000 and then apply auto_increment? > 2. replace current Cxxxxxxxxxx with INT numbers and replace the cust_id in > every other table where cust_id is foreign key? > 3. something else? > > Thanks for any help! > > -afan > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]