索引表的使用

简介: create or replace package testref as   type t_temp is table of varchar2(30) index by binary_integer;   type t_num is table of varchar2(2);     --...

create or replace package testref as

  type t_temp is table of varchar2(30) index by binary_integer;
  type t_num is table of varchar2(2);
 
  --v_temp is ref t_temp;
  function test return t_temp;
  procedure callt_temp;
end testref;

create or replace package body testref as
  function test return t_temp as
  v_temp1 t_temp;
  begin
    v_temp1(1) := 'shu';
    v_temp1(2) := 'jian';
    v_temp1(3) := 'bo';
    return v_temp1;
  end test;
 
  procedure callt_temp as
    v_aa t_temp;
    v_num t_num := t_num('1','2','3','4','5','6','7','8','9');
  begin
    v_aa := test();
    for i in 1..v_aa.count
    loop
      dbms_output.put_line(v_aa(i));   
    end loop;
    for i in 1..v_num.count
    loop
      dbms_output.put_line(v_num(i));
    end loop;
  end callt_temp;
end testref;

目录
相关文章
|
7月前
|
索引
索引
索引。
39 0
|
13天前
|
SQL 搜索推荐 关系型数据库
|
14天前
|
SQL 关系型数据库 MySQL
关于索引的使用
关于索引的使用
|
18天前
|
存储 算法 关系型数据库
索引总结(2)
索引总结(2)
|
7月前
|
存储 关系型数据库 MySQL
了解和认识索引
了解和认识索引 。
39 0
|
7月前
|
关系型数据库 MySQL 数据库
了解和认识索引
了解和认识索引。
27 0
|
11月前
|
数据库 索引
请注意这些情况下,你的索引会不生效!
数据库性能优化是确保系统高效运行的关键要素之一。而索引作为提升数据库查询性能的重要工具,在大部分情况下都能发挥显著的作用。然而,在某些情况下,索引可能会失效或不起作用,导致查询性能下降,甚至引发性能瓶颈。
|
存储 关系型数据库 MySQL
索引是什么
索引是什么
211 0
|
存储 算法 搜索推荐
②MySQL的索引(普通索引、唯一索引,主键索引、组合索引、全文索引、空间索引)相关操作
MySQL的索引(普通索引、唯一索引,主键索引、组合索引、全文索引、空间索引)相关操作
233 0
②MySQL的索引(普通索引、唯一索引,主键索引、组合索引、全文索引、空间索引)相关操作
|
存储 算法 关系型数据库
①MySQL的索引(普通索引、唯一索引,主键索引、组合索引、全文索引、空间索引)相关操作
MySQL的索引(普通索引、唯一索引,主键索引、组合索引、全文索引、空间索引)相关操作
113 0
①MySQL的索引(普通索引、唯一索引,主键索引、组合索引、全文索引、空间索引)相关操作