oracle oracle中调用存储过程的语法是什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1118695/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What's the syntax of calling a stored procedure in oracle
提问by jva
Little help needed here. I'm new to Oracle and i'm not understaning the the syntax of calling a store procedure that has a single in-out parameter. Any example please?
这里几乎不需要帮助。我是 Oracle 的新手,我不了解调用具有单个输入输出参数的存储过程的语法。请问有什么例子吗?
回答by jva
-- procedure
CREATE OR REPLACE PROCEDURE test_proc (param IN OUT NUMBER)
IS
BEGIN
NULL;
END;
-- call procedure
DECLARE
var NUMBER;
BEGIN
test_proc (var);
END;
回答by cletus
You can use an anonymous PL/SQL block to do this:
您可以使用匿名 PL/SQL 块来执行此操作:
BEGIN
do_something();
END;
回答by S M Kamran
From the tag I assume you are asking to invoke a oracle SP from SQL plus...
从标签中,我假设您要求从 SQL plus 调用 oracle SP ...
Say you have an SP with name test_me then from sql plus
假设您有一个名为 test_me 的 SP,然后来自 sql plus
SQL> execute test_me (parameters_value)
SQL> 执行 test_me (parameters_value)
回答by Singagirl
{[?=]call procedure_name[([parameter][,[parameter]]...)]}
{[?=]call procedure_name[([参数][,[参数]]...)]}
for example
例如
{call InsertOrder(10)}
{调用 InsertOrder(10)}