JDBC Transactions

What is a Transaction? So far, we have learned how to execute SQL statements using JDBC API. As you might remember, once you call an execute, executeQuery, or executeUpdate method of the Statement or PrepareStatement object, the SQL statement query will be executed. But it is not always what we need. There are many situations where the business logic of your application requires not to execute a query unless another one completes.