table same structured but differrent name

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kirkuk_um
Posts: 6
Joined: Fri 18 Aug 2006 05:09
Location: Johor Bahru, Malaysia
Contact:

table same structured but differrent name

Post by kirkuk_um » Wed 13 Sep 2006 08:40

hi all..can anybody help me..

let say i have 1 .sql file which generate 1 table from my database. the table name is payment_temp..

and i have to insert the data from payment_temp.sql into payment table which is payment table have same structured like payment_temp table.

How can i insert data from payment_temp.sql into payment table because the payment_temp.sql will generate "INSERt INTO PAYMENT_TEMP ............. " script not "INSERT INTO PAYMENT.............."

for ur info..i used MYDump to generate the .sql file and MyScript to add my data from .sql file


thx to all..

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 14 Sep 2006 08:55

You can do this changing table name in the SQL script manually.
The second way is usage of INSERT ... SELECT command of the MySQL Server. For more information please see this topic of MySQL Reference Manual.

Post Reply