Oracle Apex创建存储过程

我对apex和存储过程非常陌生。这只是我创建的一个简单示例过程。但它保持输出“编译错误成功”。希望有人能帮忙,提前感谢。Oracle Apex创建存储过程

CREATE OR REPLACE PROCEDURE get_client_info AS 

BEGIN

select CLIENTID from client

END get_client_info

回答:

分号;,变量声明和返回由into条款缺失。外

SQL>set serveroutput on; 

SQL>CREATE OR REPLACE PROCEDURE get_client_info AS

v_CLIENTID client.CLIENTID%type;

BEGIN

select CLIENTID into v_CLIENTID from client;

dbms_output.put_line(v_CLIENTID);

END get_client_info; -- no need to use "get_client_info" part here, i mean using "END;" is enough, if you'd like.

/

SQL>exec get_client_info;

或返回结果值:请尝试以下一个

SQL>CREATE OR REPLACE PROCEDURE get_client_info(o_CLIENTID out client.CLIENTID%type) AS 

BEGIN

select CLIENTID into o_CLIENTID from client;

END;

/

SQL>var clinfo varchar2;

SQL>exec get_client_info(:clinfo);

SQL>print clinfo;

以上是 Oracle Apex创建存储过程 的全部内容, 来源链接: utcz.com/qa/259018.html

回到顶部