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

oracle 存储过程 交集

create or replace procedure TestJiaoJi
  is
   type nt_table_type is table of number;
   nt1 nt_table_type:=nt_table_type(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
   nt2 nt_table_type:=nt_table_type(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
   result nt_table_type;
       iTotalNum integer:=0;--记录交集个数,不包括0
  begin
    for n in 1..5
      loop
        nt1(n) :=n;
        nt2(n) :=n+2;       
      end loop;
    result:=nt1 multiset intersect nt2;--求交集
    dbms_output.put_line('交集是:');
    for i in 1..result.count
      loop
        if(result(i)!=0) then
          iTotalNum:=iTotalNum+1;
          dbms_output.put_line(''||result(i));
        end if;
      end loop;
    if result.count>0 then
      dbms_output.put_line('包括0在内的元素个数为:'||result.count);
    end if;
    if iTotalNum>0 then
      dbms_output.put_line('不包括0在内的元素个数为:'||iTotalNum);
    end if;
      --dbms_output.new_line;
  end TestJiaoJi;


相关文档:

Oracle多行记录合并/连接/聚合字符串的几种方法

什么是合并多行字符串(连接字符串)呢,例如:
SQL> desc test;
Name     Type          Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y       &nb ......

Oracle表空间的建立

CREATE TABLESPACE mySpace
datafile
'd:\data\data1.dbf' size 1M reuse
autoextend on next 100k maxsize 2M
'd:\data\data2.dbf' size 1M reuse
online
permanent;
其中online表联机。
联机和脱机的区别和使用
联机: ORACLE服务进程关联文件。可供oracle客户端访问.如果在系统中直接删除时会弹出异常。
脱机: ......

CentOS 5.2下Oracle 10G 安装详解

CentOS 5.2下Oracle 10G 安装详解
2009-01-16 14:38
CentOS 必需的安装包
* GNOME Desktop Environment
* Editors
* Graphical Internet
* Text-based Internet
* Development Libraries
* Development Tools
* Legacy Software Development
* Server Configuration Tools
* Administration Tools
* Base
* Le ......

关于远程安装oracle与错误的处理

Linux系统删除oracle 10g(包括软件和实例)
软件环境:Linux系统 Oracle 10.0.1.0
涉及用户:root oracle
删除oracle软件和实例步骤:
1、oracle用户登陆sqlplus停止数据库:shutdown
2、oracle用户停止监听服务:lsnrctl stop(如果监听服务启动的话)
3、root用户
 删除/tmp下ora*文件
 删除/opt下OR ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号