用存储过程
CREATE OR REPLACE PROCEDURE
update(time IN VARCHAR2 )
is
v_count NUMBER (4);
CURSOR c_data IS
select * from ttable where date=time ;
begin
v_count:=1;
FOR rec_comp IN c_data LOOP
update ttable set no=v_count where 条件;
v_count:=v_count+1;
END LOOP;
end;