How to insert data using JDBC Statement API

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 0 Flares ×

To insert a record to the table you can use theĀ executeUpdate() method provided by the Statement class. In fact, the executeUpdate can be used for INSERT, DELETE or UPDATE operations.


  1. Get the Statement object from the Connection
  2. Invoke the executeUpdate passing the SQL Query for Insert
  3. Close the statement and Connection

Java Example