我想根据特定条件将数据从DB1.Table1的Col11列移至DB2.Table7的Col555。我该怎么做 ?是否有类似的声明-
select Col11 from DB1.Table1 into Col555 of Db2.Table7 where Col11 = 'Important'
您不需要COPY或INSERT但是UPDATE(使用JOIN):
COPY
INSERT
UPDATE
UPDATE [DB2].[Table7] SET [Table7].[Col555] = [Table1].[Col11] FROM [Table1] JOIN [Table7] ON -- add the base for the join here... WHERE [Table1].[Coll] = 'Important'