Add Data from One Database to Another Database at runtime

Posted by Naraayanan under Sql Server on 11/4/2013 | Points: 10 | Views : 548 | Status : [Member] | Replies : 1
Hi All,
How to add a data from One database to another database using SQL query(automatically)?

Lakshmi Naraayanan.S


Posted by: Bandi on: 11/4/2013 [Member] [MVP] Platinum | Points: 25

if those two databases are in same server then you can access objects by using fully qualified names DBName.dbo.OnjectName......

For suppose you want to copy tableA in DB1 data to TableA in DB2...

1) Connect to DB2 database

2) INSERT INTO DB2 .dbo.TableA
SELECT Columns-list
FROM DB1 .dbo.TableA

Mark This Response as Answer

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

Login to post response