From ded46bd522979e16f0e8035603333b76da51e51b Mon Sep 17 00:00:00 2001 From: Peter Mount Date: Sun, 11 Apr 1999 18:03:00 +0000 Subject: Implement UpdateCount --- src/interfaces/jdbc/example/basic.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/interfaces/jdbc/example/basic.java') diff --git a/src/interfaces/jdbc/example/basic.java b/src/interfaces/jdbc/example/basic.java index 1ea20d1d932..939d460e240 100644 --- a/src/interfaces/jdbc/example/basic.java +++ b/src/interfaces/jdbc/example/basic.java @@ -77,6 +77,10 @@ public class basic st.executeUpdate("insert into basic values (2,1)"); st.executeUpdate("insert into basic values (3,1)"); + // Now change the value of b from 1 to 8 + st.executeUpdate("update basic set b=8"); + System.out.println("Updated "+st.getUpdateCount()+" rows"); + // For large inserts, a PreparedStatement is more efficient, because it // supports the idea of precompiling the SQL statement, and to store // directly, a Java object into any column. PostgreSQL doesnt support -- cgit v1.2.3