CREATE TABLE Student ( ID int primary key identity, Name nvarchar(50) not null, Age int not null )
CREATE TABLE Student_Temp ( ID int primary key, Name nvarchar(50) not null, Age int not null )
--复制数据
INSERT INTO Student_Temp(ID,Name,Age) SELECT ID,Name,Age FROM Student WHERE ID IN (1,2,3)
UPDATE Student SET Name = B.Name FROM Student A INNER JOIN Student_Temp B ON A.ID = B.ID