描述:将Test1表中的数据放到Test2表中

1.Test2表不存在

select A,B,C insert into Test2 from Test1

select * into Test2 from Test1

2.Test2表存在

insert into Test2 (A,B,C)(select A,B,C from Test1)

如果Test1 在DB_1数据库中,Test2在DB_2数据库中

1.select A,B,C insert into DB_2.dbo.Test2 from DB_1.dbo.Test1

2.insert into DB_2.dbo.Test2 (A,B,C)(select A,B,C from DB_1.dbo.Test1)

05-11 22:55