Basic HTML version of Foils prepared May 19 99

Foil 9 SQL Statements

From Overview of JDBC: Java Database Connectivity Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Nancy McCracken,(Sangetta Aggarwal, Meryem Ispirli, Udayan Parvate, Tom Pulikal, Chao-Wei Ou)


1 createStatement makes an instance of Statement class
  • used for simple SQL statements with no parameters
2 prepareStatement makes an instance of PreparedStatement class, a subclass of Statement
  • used for SQL statements with one ore more IN parameters
  • or simple SQL statements that are executed frequently
3 prepareCall makes an instance of CallableStatement
  • used for calls to stored procedures in the database
  • inherits methods for IN parameters from PreparedStatement
  • also has methods for OUT and INOUT parameters
4 All the above statements are executed in "autocommit" mode for individual SQL statements. Transactions can be programmed with explicit methods commit and rollback.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999