存储过程在Oracle 11g数据库中

时间:2014-03-06 10:28:31

标签: stored-procedures oracle11g

我想在一个存储过程中执行insert,update,delete和select语句 使用oracle 11 g数据库。如果有人知道这个,请帮我这样做。

1 个答案:

答案 0 :(得分:-1)

代理的存储程序示例

CREATE OR REPLACE PROCEDURE GET_AGENT
     (V_CUR IN OUT SYS_REFCURSOR)
    AS
    BEGIN
      OPEN V_CUR FOR SELECT * FROM AGENT;
    END GET_EMPLOYEES;



INSERT INTO AGENT VALUES(:AGENTID,:AGENTNAME)



DELETE FROM AGENT WHERE AGENTID=:AGENTID



UPDATE AGENT SET AGENTNAME=:AGENTNAME WHERE AGENTID=:AGENTID




UPDATE AGENT SET AGENTNAME=:AGENTNAME,..... WHERE ROWID=:RECORD_ROWID
DELETE FROM AGENT WHERE ROWID=:RECORD_ROWID