简体   繁体   中英

How to copy the table with values from one database to another database table?

I Create the table abc under test database.And I create bcd table under test1 .The bcd,abc table fields are same.abc table have the data. Now, How to copy the abc table values to bcd table in sql server 2005 ?

use INSERT INTO...SELECT

INSERT INTO test1.dbo.bcd(col1, col2, col3)
SELECT col1, col2, col3
FROM test.dbo.abc

这样做:SELECT * INTO DestinationDB..MyDestinationTable从SourceDB..MySourceTable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM