zoukankan      html  css  js  c++  java
  • 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()) {...}
     
    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:
     
    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:
     
    The last thing I think that our attention should be paid to is that the lifecycle of the ResultSet
     
  • 相关阅读:
    MS SQL Server中的CONVERT日期格式化大全
    简历
    Spring源码IOC部分容器简介【1】
    HadoopHDFS设计原理
    1.Linux系统简介
    3.大话C语言变量和数据类型
    2.C语言初探
    7.函数
    8.C语言预处理命令
    9.指针
  • 原文地址:https://www.cnblogs.com/immortal-worm/p/5375424.html
Copyright © 2011-2022 走看看