DECLARE @newId bit
    DECLARE MyCur CURSOR FOR
     SELECT .  FROM x 
    OPEN MyCur
   FETCH NEXT  FROM MyCur into @newId
   WHILE(@@FETCH_STATUS=0)
   BEGIN 	 	
		UPDATE.. SET .. WHERE...@newId
   END
    CLOSE MyCur
    DEALLOCATE MyCur
 posted on 2011-02-18 14:59  纳兰_容若  阅读(131)  评论(0编辑  收藏  举报