What does java return in resultset in case of mysql update query
java, jdbc, mysql, resultset
Solution
It returns:
- The number of affected rows in the resultset if the query is a DML query (insert, update, delete)
- 0, if the query is a DDL (create, alter, etc.)
See the javadoc for more details: Execute Update Javadoc
And I strongly advise you to read the related section in JDBC Tutorial, read the section titled: Return Values for the executeUpdate Method
Problem
I need to know did the update query go wrong or right, i know how to do it in PHP, but have no idea in java (I'm new to java).