execute immediate 'update ' || v_table || ' set fount=fount+1 where idi=''' || v_code || '''';
之后,如何获取被更新的记录数?谢谢!

解决方案 »

  1.   

    select count(*) from  v_table  where idi=v_code
      

  2.   

    declare
     icount number;
    begin
      execute immediate 'update ' || v_table || ' set fount=fount+1 where idi=''' || v_code || '''';
      select count(1) into icount from  v_table  where idi=v_code;
      dbms_output.put_line(icount);
    end;
      

  3.   

    可以直接在提交数据前使用
    变量 := SQL%ROWCOUNT 
    即可.这是个查询操作记录数的东东..
      

  4.   

    select count(*) from  v_table  where idi=v_code
      

  5.   

    可以直接在提交数据前使用
    变量 := SQL%ROWCOUNT 
    即可.这是个查询操作记录数的东东..
    同意!!