• +91 9723535972
  • info@interviewmaterial.com

JDBC Interview Questions and Answers

Question - What is the use of Commit and Rollback methods?

Answer -

Commit() method: We have the commit() method in Java to commit the data. Once the SQL execution is done, we can call the commit method.

Syntax: connectionobj.commit();

Rollback() method: We have the rollback() method in Java to rollback the data. Rollback means to undo the changes. If any of the SQL statements are failed, we can call the rollback method to undo the changes.

Syntax: connectionobj.rollback();

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners