Tuesday, April 29, 2008

Copy Data from One Data Source to Another with SQL Query

U can simply move data from one data source to another by using the simple query,but be careful column name in both source and destination must be same in number and type.
And secondly if you execute the query again then it will append the same record again so please set the query to drop and create table.
Third one is the source and destination should be resides on same SQL server.
INSERT INTO Destination.dbo.Tb_Countries(Country_Name)
(SELECT Country_Name FROM Source.dbo.Tb_Countries)


It will copy all the data from source to destination.

No comments:

Post a Comment