如何执行一个oracle存储过程? [英] How to execute an oracle stored procedure?

查看:107
本文介绍了如何执行一个oracle存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用oracle 10g速成版.它为数据库开发人员提供了一个不错的用户界面.但是我在执行存储过程时遇到了一些问题.

I am using oracle 10g express edition. It has a nice ui for db developers. But i am facing some problems executing stored procedures.

程序:

create or replace procedure temp_proc is
begin
  DBMS_OUTPUT.PUT_LINE('Test');
end

它创建成功.但是当我执行时:

it is created successfully. But when i execute:

execute temp_proc;

它显示 ORA-00900:无效的SQL语句

所以这里需要帮助

推荐答案

Execute是sql * plus语法..尝试将调用包装在begin .. end中,如下所示:

Execute is sql*plus syntax .. try wrapping your call in begin .. end like this:

begin 
    temp_proc;
end;

(尽管Jeffrey说这在APEX中不起作用..但您正在尝试使其在SQLDeveloper中运行..在此处尝试运行"菜单.)

(Although Jeffrey says this doesn't work in APEX .. but you're trying to get this to run in SQLDeveloper .. try the 'Run' menu there.)

这篇关于如何执行一个oracle存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆