在SQL Server中,可以使用以下方法批量更新数据:
UPDATE table1
SET column1 = table2.column2
FROM table1
JOIN table2 ON table1.key = table2.key
UPDATE table1
SET column1 = (
SELECT column2
FROM table2
WHERE table1.key = table2.key
)
MERGE table1 AS target
USING table2 AS source
ON target.key = source.key
WHEN MATCHED THEN
UPDATE SET target.column1 = source.column2;
这些方法可以根据具体的需求和数据情况选择合适的方式进行批量更新操作。