`
hongri945
  • 浏览: 12221 次
  • 性别: Icon_minigender_1
  • 来自: 佛山
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

procedure example for the oracle stored procedure

阅读更多
//resource code

// procedure 1
create or replace procedure TQ_FirstProc is
  classname_value class %rowtype;
begin
  select * into classname_value from class where class_id='2';
  dbms_output.put_line(classname_value.class_number);
end TQ_FirstProc;

// procedure 2
create or replace procedure TQ_Proc2 is
  classname class.class_name%type;
  remark class.class_remark%type;
begin
  select class.class_name into classname from class where class.class_number = 1003;
  if classname = 'Grade one' then
     remark := '5 students';
     elsif classname = 'Grade two' then
     remark := '10 students';
     else
     remark := '15 students';
end if;
     update class set class_remark = remark where class.class_number = 1003;
     commit;
end TQ_Proc2;

// procedure 3
create or replace procedure TQ_PROC3 is
  num NUMBER(3):=5;
  rus number(5):=1;
begin
  for i in 1..num loop
    rus := rus*i;
    end loop;
    dbms_output.put_line((rus));
end TQ_PROC3;
1
1
分享到:
评论

相关推荐

    存储过程(Stored Procedure)

    ### 存储过程(Stored Procedure)详解 #### 一、存储过程的概念与作用 存储过程是一种预先编写并编译好的SQL语句集合,通常用于实现特定的数据库操作或逻辑处理。存储过程存储在数据库服务器中,用户可以通过指定...

    学习使用存储过程(Stored Procedure)

    ### 学习使用存储过程(Stored Procedure) 在IT领域中,存储过程(Stored Procedure)是一项重要的技术,尤其对于从事Web开发尤其是ASP编程的开发者来说,掌握如何使用存储过程至关重要。存储过程是一种预先编译并...

    MySQL Stored Procedure Programming

    The implementation of stored procedures in MySQL 5.0 ... This book, destined to be the bible of stored procedure development, is a resource that no real MySQL programmer can afford to do without.

    dbExpress driver for Oracle v6.2.3

    For this server, dbExpress provides a driver as an independent library that implements the common dbExpress interface for processing queries and stored procedures. As data-access layer is thin and ...

    解决OracleRAC集群下创建SDE时报Stored procedures错误问题.docx

    在Oracle RAC(Real Application Clusters)环境下,安装和配置ArcGIS Desktop的SDE(Spatial Database Extensions)数据库连接时,可能会遇到"Stored procedures"错误。这个问题通常与Oracle RAC的特性有关,即其...

    OO4O(Oracle Objects for OLE C++ Class Library)

    Oracle Objects for OLE (OO4O) is a product designed to allow easy access to data stored in Oracle databases using any programming or scripting language that supports the Microsoft ...

    Using Informatica Stored Procedure Transformation

    在数据集成领域,Informatica是一个强大的企业级ETL(提取、转换、加载)工具,而“使用Informatica存储过程转换”是它的一项重要功能。存储过程转换允许用户通过Informatica执行预先在数据库中构建的存储过程,从而...

    mysql存储过程编程 MySQL.Stored.Procedure.Programming

    mysql存储过程方面的圣经,以通俗的示例方法讲述mysql存储过程的深奥内容,In MySQL Stored Procedure Programming, they put that hard-won experience to good use. Packed with code examples and covering ...

    Oracle Security

    Standards for the Oracle Security Server Standards for Employees Sample Security Plan Index Sample Security Plan Checklist Chapter 8 Installing and Starting Oracle Segmenting Application ...

    Direct Oracle Access 4.1.2 Full Source for Delphi 2010

    w Access your stored packages easily through the TOraclePackage component or the Package Wizard w Encapsulation of standard Oracle packages (dbms_alert, dbms_job, utl_file, ...) w Many Oracle ...

    Oracle Advanced PLSQL Developer Professional Guide(PACKT,2012)

    Server-side PL/SQL is stored and compiled in the Oracle Database and runs within the Oracle executable. With this guide Oracle developers can work towards accomplishing Oracle 11g Advanced PL/SQL ...

    sybase stored procedure

    在 Sybase 中,存储过程分为两种类型:用户定义的存储过程(User-Defined Stored Procedures)和系统存储过程(System Stored Procedures)。用户定义的存储过程是由开发者创建的,可以根据业务需求进行定制。系统...

    MySql存储过程编程.chm

    Advance Praise for MySQL Stored Procedure Programming Preface Objectives of This Book Structure of This Book What This Book Does Not Cover Conventions Used in This Book Which Version? ...

    一个基于ADO.NET+COBOL+Stored Procedure的程序例子代码

    在这个例子中,COBOL代码可能会通过ADO.NET的.NET Framework Data Provider for SQL Server(通常称为SqlClient)来调用和执行Stored Procedure。 具体实现可能包括以下步骤: 1. 建立数据库连接:使用...

    代码混淆器Programs written for the CLR reside in modules. A CLR module is a byte stream, typically stored as a file in the local file system or on a Web server.

    net下的任何程序集的保密Programs written for the CLR reside in modules. A CLR module is a byte stream, typically stored as a file in the local file system or on a Web server. As shown in Figure 2.1, a...

    SAS.9.2.SQL.Procedure.Users.Guide

    The SQL procedure uses specific terminology that is important for understanding how it operates: - **Table**: A collection of related data stored in a structured format within a database. - **View**:...

    DB2 Stored Procedure 存储过程教程

    DB2存储过程是数据库管理中的一个重要概念,它是一组为了完成特定功能的SQL语句集,可以在数据库中预先编译并存储。这个教程是专为初学者设计的,旨在帮助快速掌握DB2存储过程的创建、调用以及相关概念。...

Global site tag (gtag.js) - Google Analytics