create procedure sp_name()

begin

………

end

比如:

create procedure pro_showdbs()

show datebase;

end

//用exec调用存储过程。

一个带参数的存储过程。
SQL> CREATE OR REPLACE PROCEDURE HelloWorld1 (
2 p_user_name VARCHAR2
3 ) AS
4 BEGIN
5 dbms_output.put_line('Hello ' || p_user_name || '!');
6 END HelloWorld1;
7 /

Procedure created.

SQL> CREATE OR REPLACE PROCEDURE CallHelloWorld1 (
2 p_user VARCHAR2
3 ) AS
4 BEGIN
5 -- 调用存储过程的 存储过程
6 HelloWorld1(p_user);
7 END CallHelloWorld1;
8 /

Procedure created.

执行
SQL> set serveroutput on
SQL> exec CallHelloWorld1( 'Tom' );
Hello Tom!

PL/SQL procedure successfully completed.

oracle 存储过程中调用存储过程的更多相关文章

  1. oracle中存储过程中调用存储过程

    存储过程中调用存储过程 create or replace package body PF_Role_Pack is procedure sp_GetPage_Role(pageSize_ in nu ...

  2. sqlserver存储过程中调用存储过程

    declare @value1 varchar(100)declare @value2 int exec xx.dbo.xxxxx 'param1', 'param2', 'param3', @val ...

  3. Oracle数据库中调用Java类开发存储过程、函数的方法

    Oracle数据库中调用Java类开发存储过程.函数的方法 时间:2014年12月24日  浏览:5538次 oracle数据库的开发非常灵活,不仅支持最基本的SQL,而且还提供了独有的PL/SQL, ...

  4. 在PL/SQL中调用存储过程--oracle

    在oracle10中写好了存储过程,代码如下: CREATE OR REPLACE Procedure Proc_Insert ( sName in varchar2, sAge in int, sE ...

  5. (转载)oracle 在一个存储过程中调用另一个返回游标的存储过程

    原文链接:http://www.jb51.net/article/20160.htm 实际项目当中经常需要在一个存储过程中调用另一个存储过程返回的游标,本文列举了两种情况讲述具体的操作方法. 第一种情 ...

  6. ASP.NET中调用存储过程方法

    两种不同的存储过程调用方法 为了突出新方法的优点,首先介绍一下在.NET中调用存储过程的“官方”方法.另外,本文的所有示例程序均工作于SqlServer数据库上,其它情况类似,以后不再一一说明.本文所 ...

  7. 存储过程中调用webservice

    存储过程中调用webservice其实是在数据库中利用系统函数调用OLE. 1.查找webservice api 可得到MSSOAP.SoapClient. 2.查找API 接口可得到mssoapin ...

  8. NET中调用存储过程(Output、Input)

    NET中调用存储过程(Output.Input) .NET中调用存储过程(Output.Input) 带输入输出参数的存储过程 带输入输出参数的存储过程 create procedure itemCo ...

  9. 在 SQL Server 的存储过程中调用 Web 服务

    介绍 一个老朋友计划开发一个应用,基于 .NET 和 Socket,但需要在存储过程中调用 Web 服务. 在这篇文章中我们将分享这个应用的经验,讲述如何在存储过程中调用 Web 服务,并传递参数. ...

随机推荐

  1. 【转载】 C中的access函数

    分类: C/C++ int   access(const   char   *filename,   int   amode); amode参数为0时表示检查文件的存在性,如果文件存在,返回0,不存在 ...

  2. jQuery源码-class操作

    写在前面 本文写作基于jQuery 1.9.1版本,源码分析系列目录:http://www.cnblogs.com/chyingp/archive/2013/06/03/jquery-souce-co ...

  3. vs2010 中无法打开 源文件 "stdafx.h" 未定义标识符 “xxx”

    解决方案: 项目属性->配置属性->C/C++->常规->附加包含目录->$(ProjectDir)

  4. 2015年12月13日 spring初级知识讲解(四)面向切面的Spring

    2015年12月13日 具体内容待补充...

  5. svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted

    svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted (2014-08-1 ...

  6. [译]Mongoose指南 - Model

    编译你的第一个model var xxSchema = new Schema({name: 'string', size: 'string'}); var Tank = mongoose.model( ...

  7. JavaScript数组属性与方法

    Array 对象属性 属性 描述 constructor 返回对创建此对象的数组函数的引用. length 设置或返回数组中元素的数目. prototype 使您有能力向对象添加属性和方法. Arra ...

  8. KVM虚拟机内存不足,调整参数

    Dec :: vgfs001 kernel: tiotest_AMD_x86 invoked oom-killer: gfp_mask=, oom_adj=, oom_score_adj= Dec : ...

  9. 清北暑假模拟day1 爱

    /* 水题 */ #include<iostream> #include<cstdio> #include<string> #include<cstring& ...

  10. 2015baidu复赛 矩形面积(包凸 && ps:附quickhull模板)

    矩形面积 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...