diff options
Diffstat (limited to 'src/interfaces/jdbc/example/basic.java')
-rw-r--r-- | src/interfaces/jdbc/example/basic.java | 4 |
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 |