executeUpdate
public int executeUpdate(String sql)
                  throws SQLExceptionExecutes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. Parameters:
sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing 
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing 
Throws: 
SQLException - if a database access error occurs or the given SQL statement produces a ResultSet object没大看明白,int temp = statement.executeUpdate(sql语句)一般返回什么值啊

解决方案 »

  1.   

    API:
    executeUpdate
    int executeUpdate(String sql)
                      throws SQLException执行给定 SQL 语句,该语句可能为 INSERT、UPDATE 或 DELETE 语句,或者不返回任何内容的 SQL 语句(如 SQL DDL 语句)。 参数:
    sql - SQL INSERT、UPDATE 或 DELETE 语句,或者不返回任何内容的 SQL 语句 
    返回:
    INSERT、UPDATE 或 DELETE 语句的行计数;或者 0,表示不返回任何内容的 SQL 语句 (比如说你删除了多少条数据)

    抛出: 
    SQLException - 如果发生数据库访问错误或者给定的 SQL 语句生成 ResultSet 对象
      

  2.   

    返回: 
    INSERT、UPDATE 或 DELETE 语句的行计数;或者 0,表示不返回任何内容的 SQL 语句 (比如说你删除了多少条数据) 
      

  3.   

    insert delete update 的记录的数量
      

  4.   

    sql语句在数据库中运行的影响行数