See the following two program snippets: code fragment 1: String updatestring = "Update coffees set sales = 75" + "where cof_name like 'Colombian'"; stmt.exe cuteupdate (updatestring ); code fragment 2: preparedstatement updatesales = con. preparestatement ("Update coffees set sales =? Where cof_name like? "); Updatesales. setint (1, 75); updatesales. setstring (2, "Colombian"); updatesales.exe cuteupdate (); the difference between Segment 2 and segment 1 is that the latter uses the preparedstatement object, while the former is a common statement object. The preparedstatement object not only contains SQL statements, but also has been pre-compiled in most cases. When you need to execute the statement object multiple times, the preparedstatement object will greatly reduce the running time, of course, it also speeds up database access. Whether the preparedstatement object is selected depends on whether the SQL statements with the same syntax are executed multiple times, and the difference between the two statements is only the difference between variables. If it is executed only once, it should be no different from ordinary objects, and it does not reflect the superiority of its pre-compilation. Statement is used for general SQL query callablestatement. The Stored Procedure preparedstatement is used for pre-compiled SQL statements. It is created by the createstatement method with parameters and used to send simple SQL statements. Preparedstatement is created by the preparestatement method. The preparedstatement object is used to send an SQL statement with one or more input parameters. Callablestatement is created by the preparecall method to run the SQL storage program. The callablestatement object inherits the methods used to process the in parameter from the preparedstatement object, and also adds methods used to process the out and inout parameters.