DECLARE @CurCode NVARCHAR(36); DECLARE MyCur CURSOR FOR SELECT [ID] FROM [Table]; OPEN MyCur; FETCH NEXT FROM MyCur INTO @CurCode; WHILE @@FETCH_STATUS=0 BEGIN --你的处理SQL FETCH NEXT FROM MyCur INTO @CurCode; END; CLOSE MyCur; DEALLOCATE MyCur;
时间: 2024-10-14 15:48:17