DELETE Statements
To delete from a table, use the standard DELETE SQL syntax. The driver supports deleting
only one row at a time. Hence, the primary key, Id, is always required.
String cmd = "DELETE FROM Account WHERE Id = ?"; PreparedStatement pstmt = connection.prepareStatement(cmd); pstmt.setString(1, "1"); int count=pstmt.executeUpdate(); System.out.println(count+" rows are affected"); connection.close();