executeUpdate() method of the Statement object is used to update a table in the database. This sample code first make a JDBC connection to the database and then insert a row in employee table.

 import java.sql.*;

public class InsertValue {
        
  public static void main(String[] args) {
        
    String url = " jdbc:odbc:dumy ";
    
    try {
          
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection con = DriverManager.getConnection("jdbc:odbc:dumy"; "sa", "");
              Statement stmt = con.createStatement();
              stmt.executeUpdate("insert into employee  " +  "values(1,'R',5500 )");
    }
    catch( Exception e ) {
      e.printStackTrace();        
      return;
    }
  }
}