Company

Our Services

Our Clients

Articles

Copying Table From One Database To Another

Published on: 21 September 2007 By: Ahsan Khan

How to copy data from one database table to another database table.

Code:
The following MS SQL Server script will create a table in Database_2 with the name ToTable and copy all the data from FromTable to ToTable.

SELECT *
INTO Database_1.dbo.ToTable
FROM Database_2.dbo.FromTable

Example:
SELECT cu_guid, cu_name, cu_phone, cu_address
INTO ChapterZero.dbo.Customers
FROM ChapterZeroLimited.dbo.Customers










underline

View All Articles (Articles Archive)

 

Chapter Zero Limited, 2 Providence Court, Pynes Hill, Exeter, UK, EX2 5JL
Tel: +44 (0)1392 361500, Fax: +44 (0)1392 361501