Friday, June 28, 2013

How to insert Data of one table to Another Table in Different Database in Sql Server

Introduction: In this post I will explain how we can insert the Data of one Table to Another Table in different Database in Sql Server.
Description:
In the last article I have explained How to insert data of one Table to Another Table in Sql.

SELECT * INTO DATABASE NAME1.TABLE NAME FROM DATABASE NAME2.TABLE NAME

Here DATABASE NAME1.TABLE NAME denotes that Database in table have to Cretaed.
DATABASE NAME2.TABLE NAME denotes the Database and Table Name from which Data will be copy.

Example:

SELECT * INTO Testing.dbo.COPY_DETAIL FROM TestBlog.dbo.BOOK_DETAIL

You see a Table name COPY_DETAIL will Created in Testing Database.

Related Articles on Sql Server:

How to insert data of one Table to Another Table in Sql

Is it helpful?

If yes post your comment to admire my work. You can like me on Facebook, Google+, Linkedin and Twitter via hit on Follow us Button and also can get update follow by Email.

No comments:

Post a Comment