Hi, I using Oracle Database connection in Java and I run "DELETE" sql query .
In oracle, we will use commit command after every transaction. Please tell me, How can I use commit in Java? Should we commit after every transaction?
Have a look at the API documentation of the
Connection interface and pay
special attention to the
commit() and
setAutoCommit() methods.
It depends on your transactions when and where and how to commit; i.e. you
have to define your 'unit of work'; after every such unit you should commit. Such
a unit isn't necessarily a single sql statement.
kind regards,
Jos