游标
DECLARE Sub_CURSOU_MS CURSOR FOR SELECT FInkqty, FPrjsht, FMatno FROM #subworktimeink OPEN Sub_CURSOU_MS; FETCH NEXT FROM Sub_CURSOU_MS INTO @finkqty, @prjsht, @fmatno WHILE(@@FETCH_STATUS=0)BEGIN END FETCH NEXT FROM Sub_CURSOU_MS INTO @finkqty, @prjsht, @fmatno END CLOSE Sub_CURSOU_MS; DEALLOCATE Sub_CURSOU_MS;