Sql 游标,是一个很好用的东东,下面给出它的一个示例: declare my_cursor1 cursor forselect nContentId,dtEditTime from content where datepart(month,dtEditTime)='9' and datepart(day,dtEditTime)='26'open my_cursor1declare @date sysnamedeclare @nID sysnamedeclare @tempDate datetimefetch next from my_cursor1 into @nID,@datewhile(@@fetch_status = 0)begin set @tempDate = dateadd(day,87,@date) --print @tempDate update Content set dtEditTime=@tempDate where nContentId = @nID fetch next from my_cursor1 into @nID,@dateendclose my_cursor1deallocate my_cursor1 用于把9月26日的日期改为:12月22日。游标好比Sql中的指针。 转载于:https://www.cnblogs.com/stormppp/archive/2006/12/22/600647.html