Skills: oracle stored procedure to return an array of methods

oracle stored procedure to return an array of methods: 1. to establish package create or replace package test isTYPE filename_array IS TABLE OF varchar2 (1); filename filename_array; end test;

oracle stored procedure to return an array of methods:

1. Establish a packet


create or replace package test is
TYPE filename_array IS TABLE OF varchar2 (1);
filename filename_array;
end test;


2. Establish a stored procedure


create or replace procedure test_array (v_cfjg out test.filename_array) is
begin DECLARE i number;
D_cfjg dic_cfjg% rowTYPE;
- D_nr dic_cfjg% rowTYPE;
cursor c1 is SELECT * FROM dic_cfjg;
BEGIN
i: = 0;
v_cfjg: = test.filename_array (); - array initialization open c1;
LOOP fetch c1 into D_cfjg;
EXIT WHEN c1% NOTFOUND;
i: = i +1;
v_cfjg.EXTEND;
- DBMS_OUTPUT.PUT_LINE (TO_CHAR (D_cfjg.dm));
v_cfjg (v_cfjg.count): = D_cfjg.dm;
DBMS_OUTPUT.PUT_LINE (v_cfjg (v_cfjg.count));
- Test - FETCH C1 INTO D_cfjg;
- EXIT WHEN c1% NOTFOUND;
END LOOP;
end;
EXCEPTION
WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE ( 'TOO_MANY_ROWS');
WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE (sqlerrm);
end test_array;
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Skills: oracle stored procedure to return an array of methods

  • ORACLE10G full version centos5 installed (the installation has passed)

    ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...

  • SGA extended the principle of 32bit oracle

    SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...

  • Dbms_obfuscation_toolkit use of Oracle's encryption and decryption of data (to)

    In order to protect sensitive data, oracle start from 8i to provide a data encryption package: dbms_obfuscation_toolkit. Take advantage of this package, our data can be DES, Triple DES or MD5 encryption. This article on the use of this and the use of ...

  • Oracle XDB relax resolve port conflict of 8080

    In this paper, carried: http://www.enet.com.cn/article/2008/0306/A20080306175452.shtml Oracle 9i from the start, Oracle includes the installation of the default XDB. After starting the database, Oracle XDB's http service will automatically take u ...

  • Oracle in the relationship between User and Schema

    If we want to know the database and the User What is the relationship between Schema, we must first know about User and Schema database What is the concept in the end. In SQL Server2000 in architecture because of the reason, User and Schema there is ...

  • High Availability Oracle Flashback

    Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...

  • An example of the use of TKPROF

    First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE

  • Diagnosis and principles of order

    SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...

  • ORACLE 10G dataguard configuration Step by Step

    oracle dataguard

Leave a Reply

Recent
Recent Entries
Tag Cloud
Random Entries
Latest Comments