//Delete operation according to student id
public void deleteOne(int id) {
Statement stmt=null; //Send SQL statement and return execution result
try {
strSql="delete from student where id= "+id; //Deleted SQL statement
stmt=conn.createStatement(); //Connect to database, submit SQL statement
//Execute SQL
stmt.executeUpdate(strSql);
System.out.println("Delete data successfully"+strSql);
} catch (Exception e) {
/ / TODO: handle exception
e.printStackTrace();
}
}