Statement关于execute()方法返回值的问题
来源:互联网 发布:黄酒 推荐 知乎 编辑:程序博客网 时间:2024/05/14 00:49
Executes the given SQL statement, which may return multiple results. In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
该方法是为了执行参数sql语句的,他可能返回多种返回值。在一些不常见的情况下,一个语句有可能返回多个返回值(返回值集或更新个数)。一般情况下,我们可以不必在意这个问题,除非是用来执行一个存储过程或者执行一个未知的动态的sql语句。
这个execute方法执行一个sql语句并且指向第一个返回值。你必须使用getResultSet或者getUpdateCount方法去获得返回值,也可以使用getMoreResults来获得一系列的返回值。
参数:
任意的sql语句
返回值:
true表示第一个返回值是一个ResultSet对象;false表示这是一个更新个数或者没有结果集。
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
该方法是为了执行参数sql语句的,他可能返回多种返回值。在一些不常见的情况下,一个语句有可能返回多个返回值(返回值集或更新个数)。一般情况下,我们可以不必在意这个问题,除非是用来执行一个存储过程或者执行一个未知的动态的sql语句。
这个execute方法执行一个sql语句并且指向第一个返回值。你必须使用getResultSet或者getUpdateCount方法去获得返回值,也可以使用getMoreResults来获得一系列的返回值。
参数:
任意的sql语句
返回值:
true表示第一个返回值是一个ResultSet对象;false表示这是一个更新个数或者没有结果集。
0 0
- Statement关于execute()方法返回值的问题
- Statement 的 execute(sql) 方法的返回值
- Statement.execute() 返回值
- 关于ResultSet.execute()方法返回值的解析!!!
- execute返回值的问题
- JDBC Statement接口实现的execute方法
- execute、executeUpdate、executeQuery三者的区别(及返回值)PreparedStatement和statement
- 关于实例方法的值返回问题
- 关于execute、executeUpdate、executeQuery三者返回值的区别
- struts execute方法中调用addFieldError方法,返回问题
- 关于Arrays.binarySearch()方法的返回值的问题
- 关于request对象的方法返回值类型问题
- 关于Mycommand方法ExecuteNonQuery的返回值问题
- 关于获取jquery ajax方法返回值参数的问题
- 关于ORACLE Statement 对象的数目问题
- execute(sql)三种执行方法的返回值表示的含义
- statement的四个执行方法---executeQuery/executeUpdate/execute/executeBatch---和早期数据库防黑技术
- SQL中execute操作返回false的问题
- 面试时能和面试官聊的一些struts1的特性
- 简单的客户端验证电话输入
- velocity学习笔记
- mysql中插入语句返回自增长操作
- round()和trunc()函数的应用
- Statement关于execute()方法返回值的问题
- HelloWorld系列之——dom4j读xml文件
- ibatis多对一表关联映射的解决过程
- 专题——基础递推
- js实现<a>超链接的跳转验证
- HelloWorld系列之——发送邮件
- HelloWorld系列之--------手动下载网络页面
- 欢迎使用CSDN-markdown编辑器
- HelloWorld之------jetty运行