On Wed, 17 Nov 2004 18:37:37 -0700, Jim McAtee <[EMAIL PROTECTED]> wrote:
> How would this be done if table_2 already exists?  It has an
> auto_increment field as PK and I want to take all the rows from table_1
> and dump them into table_2.  The records being copied from table_1 can get
> new primary keys as there are no foreign key relationships to maintain.

I suppose the following (provided the table structure of the both
tables are exactly the same):

first, make a backup ;)
then, delete the primary key column of the table to be imported (for
correct new primary key values later)
create a table dump. do NOT make use of extended inserts, and be sure
not to include the table creation commands. only the data itself is
needed.

Then import the data into the second table and be happy :)

Bye
Fred

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to