回到基础:为 Apache Derby 的 ij 工具编写脚本
2010-04-23 00:00:00 来源:WEB开发网滚动不敏感型(Scroll-insensitive)游标
有时,仅向前型游标是不够的,因为您需要在记录之间来回移动。为此,您可以创建滚动不敏感型游标,如 清单 4 所示。
清单 4. 滚动不敏感型游标
ij(CONNECTION0)> get scroll insensitive cursor projectScroll as
'select * from projects';
ij(CONNECTION0)> absolute 2 projectScroll;
ID |PROJECT_NAME |STATUS |COMMENTS
--------------------------------------------------------------------
2 |Bass O Matic |1 |In production
ij(CONNECTION0)> relative -1 projectScroll;
ID |PROJECT_NAME |STATUS |COMMENTS
--------------------------------------------------------------------
1 |Wheel O Fish |0 |Waiting for contract
ij(CONNECTION0)> relative 2 projectScroll;
ID |PROJECT_NAME |STATUS |COMMENTS
--------------------------------------------------------------------
3 |Patty O Furniture |-1 |Need clarification. Does
anybody know what this is?
ij(CONNECTION0)> previous projectScroll;
ID |PROJECT_NAME |STATUS |COMMENTS
--------------------------------------------------------------------
2 |Bass O Matic |1 |In production
ij(CONNECTION0)> before first projectScroll;
No current row
ij(CONNECTION0)> next projectScroll;
ID |PROJECT_NAME |STATUS |COMMENTS
--------------------------------------------------------------------
1 |Wheel O Fish |0 |Waiting for contract
- ››Apache添加mod_aspdotnet.so支持ASP.NET配置指南
- ››Apache中改变php.ini的路径
- ››Apache2.2与Tomcat6整合及虚拟主机配置
- ››Apache+php+mysql在windows下的安装与配置图解
- ››基础推广如何完成网站的优化升级(一)
- ››Apache+Subversion完美结合,CentOS下实现版本控制...
- ››Apache HTTPServer2.2.16 发布
- ››Apache Tomcat 6.0.29 (稳定版)
- ››Apache HTTP Server 2.3.6 alpha 发布
- ››Apache+Subversion如何实现版本控制
- ››Apache+Subversion完美结合
- ››Apache的几种常见应用举例与分析
更多精彩
赞助商链接