用下迴圈的方式...目前想到比較好的解答就這樣了
declare @Start int
declare @End int
set @Start =1
set @End=3480
while (@Start < @End)
begin
update TABLE_A
set BirthDay =
(select BirthDay from TABLE_B where PtNo = @Start)
WHERE PtNo = @Start
set @Start=@Start +1
end
沒有留言:
張貼留言