The following table uses order_id as the primary key. My problem is that I
need to be able to change order_id so that it is not a primary key. Next, I
want to add a new auto incrementing key. What sql commands should I use to
first back up the table and then to accomplish this modification. This is a
production table so I must be very careful.


mysql> describe transaction_response;
+---------------+---------------+------+-----+---------+-------+
| Field         | Type          | Null | Key | Default | Extra |
+---------------+---------------+------+-----+---------+-------+
| order_id      | int(11)       |      | PRI | 0       |       |
| result        | tinyint(16)   | YES  |     | NULL    |       |
| pnref         | varchar(12)   | YES  |     | NULL    |       |
| respmsg       | varchar(128)  | YES  |     | NULL    |       |
| authcode      | varchar(6)    | YES  |     | NULL    |       |
| avsaddr       | char(1)       | YES  |     | NULL    |       |
| avszip        | char(1)       | YES  |     | NULL    |       |
| timestamp     | timestamp(14) | YES  |     | NULL    |       |
| merchant_name | varchar(20)   | YES  |     | NULL    |       |
+---------------+---------------+------+-----+---------+-------+


Thank You
Paul


---------------------------------------------------------------------
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

Reply via email to