英文:
How do I execute the procedure in Oracle Apex
问题
I created the simplest procedure in Oracle Apex, but it failed when I used the exec statement to execute.
How can I execute the procedure in Oracle Apex?
This is my procedure.
create or replace PROCEDURE hello_world
AS
BEGIN
dbms_output.put_line('Hello World!');
END;
/
I found in other StackOverflow workarounds, I can call it like this in the Apex > SQL Workshop > SQL Commands:
BEGIN
hello_world;
END;
But I want to call it like exec hello_world
statement in Oracle Apex to get the result, is there a way? What menu or screen should I execute?
英文:
I created the simplest procedure in Oracle Apex, but it failed when I used the exec statement to execute.
How can I execute the procedure in Oracle Apex ?
This is my procedure.
create or replace PROCEDURE hello_world
AS
BEGIN
dbms_output.put_line('Hello World!');
END;
/
I found in other StackOverflow workarounds, I can call it like this in the Apex > SQL Workshop > SQL Commands:
BEGIN
hello_world;
END;
But I want to call it like exec hello_world
statement in Oracle Apex to get the result, is there a way? What menu or screen should I execute?
答案1
得分: 1
exec
(实际上是缩写的execute
)(文档)是一个SQL*Plus命令。
exec
嵌入 PL/SQL 语句到 begin-end
块中,以便执行。
它在一些其他环境中也可以工作,如 Oracle SQL Developer 或 TOAD,但它在 Oracle Application Express(Apex)中不起作用。
因此,对于你的问题
我想在 Oracle Apex 中像
exec hello_world
语句一样调用它来获取结果,有办法吗?
答案是没有。
英文:
exec
(which is, actually, abbreviated execute
) (<a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/sqpug/EXECUTE.html#GUID-A64F29C8-B5C7-426D-82E9-A8E85763F3D6">documentation</a>) is a SQL*Plus command.
exec
embeds PL/SQL statement into begin-end
block so that it could be executed.
It works in some other environments as well, such as Oracle SQL Developer or TOAD, but it does not work in Oracle Application Express (Apex).
Therefore, the answer to your
> I want to call it like exec hello_world
statement in Oracle Apex to get the result, is there a way?
is no.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论