当前位置: 代码迷 >> SQL >> JAVA 中的SQL实施方法
  详细解决方案

JAVA 中的SQL实施方法

热度:89   发布时间:2016-05-05 13:10:26.0
JAVA 中的SQL执行方法
来源:http://www.coderanch.com/t/301594/JDBC/java/Difference-between-execute-executeQuery-executeUpdate
boolean execute()Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.ResultSet executeQuery()Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.int executeUpdate()Executes the SQL statement in this PreparedStatement object, which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.
  相关解决方案