aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/example/basic.java
diff options
context:
space:
mode:
authorPeter Mount <peter@retep.org.uk>1999-04-11 18:03:00 +0000
committerPeter Mount <peter@retep.org.uk>1999-04-11 18:03:00 +0000
commitded46bd522979e16f0e8035603333b76da51e51b (patch)
tree9f339ae3f8a351d9105b3da30b8df4abc9b4b0cb /src/interfaces/jdbc/example/basic.java
parent50eb8b7d7f1981970ae0c011dffa35efa590e2c0 (diff)
downloadpostgresql-ded46bd522979e16f0e8035603333b76da51e51b.tar.gz
postgresql-ded46bd522979e16f0e8035603333b76da51e51b.zip
Implement UpdateCount
Diffstat (limited to 'src/interfaces/jdbc/example/basic.java')
-rw-r--r--src/interfaces/jdbc/example/basic.java4
1 files changed, 4 insertions, 0 deletions
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