JDBC之ResultSet

JDBC之ResultSet

ResultSet is a interface
More gnerally,ResultSet is a class involves a table returned by executeQuery cluase from jdbc,which includes the whole information we wanna get from our query,however if we want to retrive these info in java applet ,jdbc provides us a cursor.Let’s see how Java API explain it

After reading this explanation , we can understand the meaning of whlie (rs.next()) {…}
 
JDBC之ResultSet
In the while loop,we use cursor to access each row,but here comes the problem:how could we convert the underlying data in the set pointed by cursor to Java type?Here are the explanation from Java API:
 
JDBC之ResultSet
We must provide a parameter to getter methods we invoke,which stands for the column that we wanna get information from.As for the parameter,API also give us some details about it.Let’s take a look at it:
 
JDBC之ResultSet
The last thing I think that our attention should be paid to is that the lifecycle of the ResultSet
 
JDBC之ResultSet

转载于:https://www.cnblogs.com/immortal-worm/p/5375424.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/109078.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • iostat命令详解——linux性能分析[通俗易懂]

    iostat命令详解——linux性能分析[通俗易懂]之前总结uptime和free命令,今天继续来总结一下iostat。给自己留个笔记,同时也希望对大家有用。版本信息:         sysstatversion9.0.4         (C)SebastienGodard(sysstatorange.fr)基本使用:          iostat[-c][-d][-N][-n

    2022年10月6日
  • idea 2022.01.4激活码(注册激活)2022.02.14

    (idea 2022.01.4激活码)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~https://javaforall.net/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~4KDD…

    2022年4月1日
  • 等价无穷小公式_高数八个重要极限公式

    等价无穷小公式_高数八个重要极限公式

    2022年8月11日
  • NTP协议实现_ntp时间同步端口

    NTP协议实现_ntp时间同步端口本文出处:http://www.eefocus.com/html/10-04/94667s.shtml10.4 实验内容——NTP协议实现1.实验目的    通过实现NTP协议的练习,进一步掌握Linux网络编程,并且提高协议的分析与实现能力,为参与完成综合性

    2022年10月12日
  • sql is not null 优化(oracle语句索引优化)

    oracle优化:ISNULL的优化优化方法:通过nvl(字段i,j),将字段i中为空的数据转化为j,从而将条件iisnull转化为j=nvl(i,j);转化isnull在所用oracle版本提升明显,注意:使用时必须确保字段i的数据不包含j!函数介绍:nvl(a,b,c,…)当a为空时取b,当b为空取c,以此类推.优化示例select*fromtab_i…

    2022年4月17日
  • Unity 3D 入门基础[通俗易懂]

    Unity 3D 入门基础[通俗易懂]1.1菜单栏File(文件):打开和保存场景、项目、以及创建游戏。Edit(编辑):主要用于Unity内部功能、快捷键设置。Assets(资源):用于资源的创建、导入和导出。GameObject(游戏对象):用于游戏对象的创建。Component:(游戏组件):为游戏对象等添加组件来实现部分功能。Window(窗口):显示特定视图。Help(帮助):主要包含使用手册、资源商店、论坛等。1.2五个视图层级视图(Hierarchy):主要存放游戏场景中的具体的游戏对象。场

    2022年8月10日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号