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

View All Articles (Articles Archive)