遍历关联数组 index by varchar2
--字符串序列要这样
declare
type t is table of number(3) index by varchar2(3);
hash_t t;
l_row varchar2(3);
begin
hash_t('a') := 10;
hash_t('b') := 20;
l_row :=hash_t.first;
while(l_row is not null) loop
dbms_output.put_line(hash_t(l_row));
l_row:=hash_t.next(l_row);
end loop;
end;
--数字序列可以这样
declare
type t is table of number(3) index by pls_integer;
hash_t t;
l_row varchar2(3);
begin
hash_t(1) := 10;
hash_t(2) := 20;
for i in hash_t.first .. hash_t.last loop
dbms_output.put_line(hash_t(i));
end loop;
end;
遍历关联数组 index by varchar2的更多相关文章
- JavaScript-//FOR/IN循环。当使用for/in循环遍历关联数组时,就可以清晰地体会到for/in的强大之处。
<script> //FOR/IN循环.当使用for/in循环遍历关联数组时,就可以清晰地体会到for/in的强大之处. function getvalue(portfolio){ var ...
- PHP中遍历关联数组的方法
下面介绍PHP中遍历关联数组的三种方法:foreach <?php $sports = array( 'football' => 'good', 'swimming' => 'ver ...
- 095-PHP遍历关联数组,并修改数组元素值
<?php $arr=array('I'=>1,'II'=>2,'III'=>3,'IV'=>4,'V'=>5); //定义一个数组 echo '修改之前数组信息: ...
- html表单通过关联数组向php后台传多条数据并遍历输出
通过表单向php后台传多条数据,以关联数组方式呈现,废话不多说,代码附上: html表单代码,方式我设置为get: <form action="php/cart.php" m ...
- JavaScript 数组2—关联数组
㈠什么是关联数组 可以自定义下标名称的数组 ㈡为什么 索引数组中的数字下标没有明确的意义 ㈢何时 只希望每个元素都有专门的名称时 ㈣如何:2步 1)创建空数组 2)向空数组中添加新元素,并自定义下标名 ...
- bash shell关联数组总结
[原创]本博文为原创博文,引用或转发请注明原始出处和链接:https://www.cnblogs.com/dingbj/p/dict_array.html 什么是关联数组? 关联数组相对于索引数组,又 ...
- PHP二维关联数组的遍历方式
采用foreach循环对二维索引数组进行遍历,相对来讲速度更快,效率更高,foreach循环是PHP中专门用来循环数组的.实例也相对简单,多加练习,想清楚程序运行逻辑即可. <?php $arr ...
- 094-PHP遍历索引数组和关联数组
<?php $arr=array(63,'abc',45,'hello',3,7,9,'DEF'); //定义一个索引数组 echo '遍历一个索引数组:<br />'; forea ...
- shell编程之数组和关联数组
一.数组类似c语言的数组 1.两种赋值方式 可以整体定义数组:ARRAY_NAME=(value0 value1 value2 value3 ...) 此时数组的下标默认是从0开始的 还可以单独定义数 ...
随机推荐
- 三个C++资源链接(大量)
https://github.com/fffaraz/awesome-cpp http://blog.jobbole.com/78901/ https://github.com/programthin ...
- hibernate Criteria查询 2.3
Criteria对象提供了一种面向对象的方式查询数据库.Criteria对象需要使用Session对象来获得一个Criteria对象表示对一个持久化类的查询 查询所有 Session session ...
- c#中的委托使用(方法的调用, 和类的实话)
方法的调用 delegate int test1(int a); class Program { static int num = 10; static void Main(string[] args ...
- CursorAdapter说明
参考:http://www.bubuko.com/infodetail-734550.html和http://blog.csdn.net/yuzhiboyi/article/details/76548 ...
- iOS 开发http post 文件的上传
iOS开发网络篇—文件的上传 说明:文件上传使用的时POST请求,通常把要上传的数据保存在请求体中.本文介绍如何不借助第三方框架实现iOS开发中得文件上传. 由于过程较为复杂,因此本文只贴出部分关键代 ...
- CodeForces 525C Ilya and Sticks 贪心
题目:click here #include <iostream> #include <cstdio> #include <cstring> #include &l ...
- CGroup 介绍、应用实例及原理描述
CGroup 介绍 CGroup 是 Control Groups 的缩写,是 Linux 内核提供的一种可以限制.记录.隔离进程组 (process groups) 所使用的物力资源 (如 cpu ...
- docker学习笔记15:Dockerfile 指令 USER介绍
USER指令用于指定容器执行程序的用户身份,默认是 root用户. 在docker run 中可以通过 -u 选项来覆盖USER指令的设置. 举例:docker run -i -t -u mysql ...
- poj1887 Testing the CATCHER
Testing the CATCHER Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 13968 Accepted: 5 ...
- 当webview遇到了Slidingmenu,webView出现卡白,解决方案
先介绍一下什么是SlidingMenu: Sliding Menu的是一种比较新的设置界面或配置界面效果,在主界面左滑或者右滑出现设置界面,能方便的进行各种操作.如Evernote.Google+.F ...