DECLARE authors_cursor CURSOR FOR
(
select ItemId,OutImagesURL from car.dbo.newcar newcar
)
declare @carID nvarchar(1000)
declare @OutImagesURL nvarchar(1000)
OPEN authors_cursor
while (1=1)
begin
FETCH NEXT FROM authors_cursor into @carID,@OutImagesURL
if @@fetch_status <> 0
break
insert into tt(carid,OutImagesURL)
select @carID
end
close authors_cursor
DEALLOCATE authors_cursor