如果另一个库中没有同名的表
select * into b数据库.dbo.a表 from a数据库.dbo.a表 where 条件

如果是追加到另一个表中
inert into b数据库.dbo.a表
select * from a数据库.dbo.a表 where 条件

不同数据库的格式: [数据库名.所有者名.表名]

INSERT INTO 数据库B.dbo.表2
SELECT * FROM 数据库A.dbo.表1 WHERE ....

 


insert into 数据库A.dbo.TableA
select * from 数据库B.dbo.TableA

相关文章:

  • 2021-11-06
  • 2021-07-01
  • 2021-09-01
  • 2022-12-23
  • 2021-09-17
  • 2021-06-19
猜你喜欢
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案