JDBC – Insert, Update and Delete example.

Hello Friends,

This is the simple example for executing the SQL statements to INSERT, UPDATE or DELETE any records from the database using JDBC. In the below code I have explained all the three operations. When we insert, update or delete any records from the database we are updating the database, hence we use the executeUpdate() function with the Statement.

Please take the note that whenever you provide the String/Text values for update then add the values in between ” ” or ‘ ‘. This is mandatory for all the Sting types else the DB will not recognize the values and will throw the error. Following is the code:

Hope this will help you.
Nikhil Naoghare.

2 thoughts on “JDBC – Insert, Update and Delete example.”

  1. You actually make it seem so easy along with your presentation however I to find this topic to be actually one thing which I think I might by no means understand. It kind of feels too complex and very extensive for me. I am looking forward in your subsequent put up, I’ll try to get the cling of it!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.