遍历关联数组 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开始的 还可以单独定义数 ...
随机推荐
- Treasure Exploration(二分最大匹配+floyd)
Treasure Exploration Time Limit: 6000MS Memory Limit: 65536K Total Submissions: 7455 Accepted: 3 ...
- Swift--基本数据类型(一)
不像更多语言中,X不要求你写一个分号(;)在你的代码中的每一个语句后,尽管能够这样做.然而,假设你想在一行中写入多个单独的语句分号是必需的: . 1 let cat = "" ...
- 你喜欢SOAP吗?反正我不喜欢!
叫什么Simple Object Access Protocol,实际上一点都不Simple! 说什么轻量级协议,从它基于XML的编码就知道它有多臃肿! 说什么跨平台特性,其实各个语言需要自己实现一整 ...
- Palindromes _easy version
Palindromes _easy version Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Jav ...
- eclipse the user operation is waiting for building workspace" to complete
"the user operation is waiting for building workspace" to complete", 解决办法: 1.选择菜单栏的“P ...
- Python之路Day8
摘要: Socket编程 异常处理 线程.进程 1.socket编程 1.1 socket 三次握手,注意阻塞的应用. 1.2 socketserver(2.x写作:SocketServer) 实现多 ...
- hackyviewpager有什么用
继承于viewpager 可以和photoView一起使用,实现相册图片的左右滑动,放大缩小,等 package davidwang.tm.view; import android.content.C ...
- jquery删除动态增加的li
<script type="text/jscript"> //楼主帮你修改调整了下 $(document).ready(function () { $('.zuo li ...
- Hibernate JPA 中配置Ehcache二级缓存
在Hibernate3 JPA里配置了一下非分布式环境的二级缓存,效果不错.具体过程如下: 1, 需要引入的jar包 http://ehcache.org/downloads/catalog 下载的包 ...
- HDU 4739 求正方形个数
九野的博客,转载请注明出处:http://blog.csdn.net/acmmmm/article/details/11711707 求所有可能围成的正方形,借个代码 #include <que ...