易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle :存储过程和函数的几种写法

关于存储过程和函数的定义网上一搜一大把,这里就不特殊介绍了,这里就只对我自己写的几种格式的存储过程和函数做一些总结,希望对大家有点帮助。
 一:存储过程
  
1:最普通的一种。(传参,查询游标,执行,循环游标做插入动作)。
create or replace procedure zy2040_sirole(rolekey in varchar2) is
  roleid varchar2(30);
  cursor cur_zy2040_department_id(rolekeys in varchar2) is
    select distinct d.department_id
      from si a, si_staff b, sec_staff c, sec_department d
     where a.siid = b.siid
       and b.staffid = c.staff_id
       and c.department_id = d.department_id
       and a.provinceid = '0'
       and a.si_status in ('A', 'W')
       and d.department_id not in
           (select a.department_id
              from sec_department_role a, sec_role b
             where a.role_id = b.role_id
               and b.role_key = rolekeys);
  cursor cur_zy2040_staffid(rolekeys in varchar2) is
    select distinct b.staffid, d.department_id
      from si a, si_staff b, sec_staff c, sec_department d
     where a.siid = b.siid
       and b.staffid = c.staff_id
       and c.department_id = d.department_id
       and a.provinceid = '0'
       and a.si_status in ('A', 'W')
       and b.staffid not in (select a.staff_id
         &nb


相关文档:

oracle 归档日志

 C:\Documents and Settings\Administrator>sqlplus/nolog
SQL> CONNECT/AS SYSDBA
SQL> SHUTDOWN NORMAL/IMMEDIATE
SQL> STARTUP MOUNT
SQL> ARCHIVE  LOG  LIST                    
SQL> ALTER DATA ......

Oracle学习笔记摘录1

 1.create alter insert update select等
如何建表
   学生表student
        create table student( --学生表
           xh number(4), --学号
           ......

Oracle学习笔记摘录7

 用途: <1>模块化
<例子> --公司的员工的管理
         1.增加一个员工
         2.员工离职
用存储过程和函数来实现
1.增加一个员工
create sequence seq1 start with 7935;
create or replace function insert ......

ORACLE数据库里表导入SQL Server数据库

ORACLE数据库里表导入SQL Server数据库
   
  1、在目的SQL Server数据库服务器上安装ORACLE Client软件或者ORACLE ODBC Driver.
    在$ORACLE_HOME\network\admin\tnsnames.ora里配置ORACLE数据库的别名(service name)。
   
  2、在WIN2000或者win200 ......

Oracle笔记

Oracle 的代码表示及事例
 
1.  select + xxx + from + xxx   //查询语句  xxx 表示一个表  
     Select  *  from  + xxx   // * 表示一个列表中所有的内容
 
  类: 1)//  select * from country
 
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号