try { Statement stmt = connection.createStatement(); stmt.executeUpdate("INSERT INTO mytable VALUES ('Patrick Chan', 123, 1.23)"); connection.close(); } catch (SQLException e) { }