日期:2014-05-17 浏览次数:20769 次
set serveroutput on; / create or replace PROCEDURE UPDATE_PROCEDURE_NAME ( V_ID IN NUMBER, V_VALUE IN VARCHAR2 ) IS val varchar(50):=''; cou int:=0; BEGIN select count(1) into cou from TEST where ID=V_ID; if cou<>0 then select VALUE into val from TEST where ID=V_ID; dbms_output.put_line(val); UPDATE TEST SET VALUE=V_VALUE WHERE ID=V_ID; select VALUE into val from TEST where ID=V_ID; dbms_output.put_line(val); commit; end if; END UPDATE_PROCEDURE_NAME; / --这样建立就可以看清了