Results 1 to 1 of 1
Thread: Number of updated records
-
Number of updated records
Sometimes you would like to get the number of records updated by the SQL. It is really very easy. The method executeupdate(…) return an integer value that represents the number of records updated.
Java Code:int rows = stmt.executeUpdate( "UPDATE customer SET cust_name = ‘Laiq’ WHERE cust_id = 100" ) ; System.out.println( rows + " Rows modified" ) ;
Similar Threads
-
Getting number of records (JDBC 2.0)
By Java Tip in forum Java TipReplies: 0Last Post: 02-11-2008, 08:51 AM -
Deleting records from database table using PreparedStatement
By Java Tip in forum Java TipReplies: 0Last Post: 02-09-2008, 08:31 PM -
Updated Forum Rules
By levent in forum Suggestions & FeedbackReplies: 1Last Post: 08-12-2007, 01:09 PM -
JTextArea that I would like to have updated as strings are appended
By paul in forum AWT / SwingReplies: 1Last Post: 08-07-2007, 05:13 AM -
Query with 1 record vs. multiple records
By anderma8 in forum JDBCReplies: 5Last Post: 07-09-2007, 11:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks