Sunday, February 22, 2015

OCPJP7 JDBC

1. JDBC 3.0: Class.forName("org.gjt.mm.mysql.Driver")
2. JDBC 4.0: META-INF/services/java.sql.Driver, Transaction, Driver, Connection, Statement and ResultSet Interface.
3. DatabaseMetaData can get default transaction isolation level, the name of JDBC driver and the name of stored procedures in the database.
4. When ResultSet returns the cursor point to the first row before the ResultSet. You must call next().
5. executeupdate(sql) takes INSERT, UPDATE, DELETE AND return int, executequery(sql) take only select and return ResultSet.
6. When connection is close, ResultSet.next() will return SQLException.
7. PreparedStatement和CallableStatement execute 不带参数
8. RowSetFactory does not extend AutoClosable

No comments:

Post a Comment