1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Implement UpdateCount

This commit is contained in:
Peter Mount
1999-04-11 18:03:00 +00:00
parent 50eb8b7d7f
commit ded46bd522
4 changed files with 25 additions and 4 deletions

View File

@ -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