Hello.

If you have some unique identifier, you can simply use

REPLACE INTO Table_B SELECT FROM Table_A;

But be sure to read and _understand_ the manual section about REPLACE
beforehand! Else, if you have not the required unique indexes, the
result will not be what you want.

INSERT INGORE would be another possibility.

Bye,

        Benjamin.


On Mon, Apr 29, 2002 at 05:36:14PM -0300, [EMAIL PROTECTED] wrote:
> Hi List
> 
> I have two tables inside a MySQL DB. The first one has 30 Millions records
> (30.000.000) say it Table-A . The second one has 500 Thousands Records
> (500.000) say it Table_B. I need that all the records from Table-B to be
> inserted in Table-A. Because an operator error many of the records from
> Table-B is already present at Table-A but not all of them.
> 
> I think I can do two things
> 
> 1 - Delete Table-B from Table-A where key-B = key-A and after that, insert
> all Table-B into Table-A
> 2 - Create an intermediary table say it Table-C that has all the records
> from the Table-B not present at the Table-A and insert that Table-C
> afterward
> 
> Is there any other and better (more fast) way to do this?
> 
> Please any help will be very, very appreciated.

-- 
[EMAIL PROTECTED]

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