How to copy data to a table which is in another database in MYSQL

Posted by Amritha444 under Sql Server on 4/17/2012 | Points: 10 | Views : 2228 | Status : [Member] | Replies : 4
Hi all

i have two tables with same structure in different databases i want to copy content of one table to another by keeping existing entries in table.eg. I have two tables a1 in database one and a1 in database two.first table and second table has different data i want all data in first table to second table without deleting existing entries.How to do that

Thanks in Advance
Amrutha




Responses

Posted by: Gemamgall on: 6/27/2012 [Member] Starter | Points: 25

Up
0
Down
Use mysql mastro application for mysql and if you are using SQL then use import export wizard

Thanks and Regards,

Vinay Gandhi
www.quadtechindia.com

Amritha444, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ajay.Kalol on: 6/28/2012 [Member] Starter | Points: 25

Up
0
Down
In SQL Server it is like following :

http://ajaypatelfromsanthal.blogspot.in/2012/05/copy-data-from-one-table-to-another.html

Ajay
ajaypatelfromsanthal.blogspot.in

Amritha444, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muralidosscm on: 7/4/2012 [Member] Starter | Points: 25

Up
0
Down
INSERT INTO Database1.dbo.TABLE1 SELECT * FROM Database2.dbo.TABLE1

Regards
Muralidoss M

Amritha444, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muralidosscm on: 7/4/2012 [Member] Starter | Points: 25

Up
0
Down
UPDATE table_1, table_2 SET table_2.column_1 = table_1.column_1;



Regards
Muralidoss M

Amritha444, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response