原文

An object that represents a precompiled SQL statement.
A SQL statement is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times. Note: The setter methods (setShort, setString, and so on) for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type INTEGER, then the method setInt should be used. If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type. In the following example of setting a parameter, con represents an active connection: PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
SET SALARY = ? WHERE ID = ?");
pstmt.setBigDecimal(1, 153833.00)
pstmt.setInt(2, 110592)

翻译

一个对象(它代表一个预编译的sql statement)

一个sql Statement是预编译的,存储在一个PreparedStatement对象。
这个对象可以常常高效的多次执行这个statement。 备注:设置方法(setShort,setString,等等)用来设置IN参数值时必须指定类型(这个类型兼容被定义的输入参数的sql类型)。
例如,如果IN参数有SQL类型INTEGER,那么setInt方法就应该被使用。 如果需要任意参数类型转换,应该使用setObject()方法指定sql类型。 在下面的例子中,设置一个参数,con代表一个活动的连接

最新文章

  1. ABP理论学习之领域服务
  2. sqlserver 连接远程数据库小结
  3. Manacher
  4. (1)as_view() (2)在urls.py里面出现的pk是怎么回事 (3)RetrieveAPIView表示什么
  5. nginx 反向代理 与 Apache backend的配置联合配置
  6. Python webpy微信公众号开发之 回复图文消息
  7. linux搭建java环境
  8. Fragment回调接口应用间分享数据
  9. Python协程深入理解
  10. 智能合约语言 Solidity 教程系列2 - 地址类型介绍
  11. Windows10系统:任务栏中电池图标消失问题的解决方法
  12. SQLAlchemy使用(三)搭配Flask框架使用
  13. 继续mysql8navicat12连接登录的异常
  14. 利用Linux系统生成随机密码的10种方法【转】
  15. ELK基础原理
  16. Scrapy学习篇(十三)之scrapy+selenum获取网站cookie并保存带本地
  17. python scrapy爬取知乎问题和收藏夹下所有答案的内容和图片
  18. tftp 传输文件
  19. How to Sign in as a Different User in SharePoint 2013
  20. JAVAEE——淘淘商城第一天:电商行业的背景和技术特点,商城的介绍、技术的选型、系统架构和工程搭建

热门文章

  1. 知方可补不足~SQL2008中的发布与订阅模式
  2. EF架构~豁出去了,为了IOC,为了扩展,改变以前的IRepository接口
  3. 解析for循环
  4. 20_学生选课数据库SQL语句练习题1
  5. IIS集成模式下,URL重写后获取不到Session值
  6. 常用的java类型转json的转换类
  7. 领会CSS,实际中的研究
  8. Oracle Linux
  9. WTF Forms – 使用 CSS 实现用户体验更好的表单
  10. iOS_UIImge_Gif的展示