Q: Why SQL UPDATE actually performs a DELETE instead? I have the following code and when it executes on the record being UPDATED, the record actually ends up being DELETED from the database table. This is an Oracle Database. Very odd. So far, I have been unable to pull any logging information from the database server that might explain what is happening on a lower level. The System.out.println statements that I included show the  output that I am expecting at the moment they execute, yet, when I search for the record both via the java application itself, and then later via the SQL Developer tool - looking at the table itself, the actual data is gone. This is the java code that I have. Any thoughts, ideas, or answers as to how and why an update would perform a delete, instead of just an update is appreciated, thanks. Please let me know if there is anything else you might need that I have not properly provided, thanks. 
 Class.forName("oracle.jdbc.driver.OracleDriver");
.
.
.
     if(PBupdate.equals("updaterecords")) {
        try {

    ArrayList resultsArray = (ArrayList) session.getAttribute("searchresults");
    int pos = 0;
    String ID = "";
    System.out.println("updatestaff : pos = " + pos + " resultsArray.size() = " + resultsArray.size());
    while (pos < resultsArray.size()) {

       System.out.println("updatestaff : pos = " + pos);
       System.out.println("updatestaff : resultsArray.get(pos + 1) = " + resultsArray.get(pos + 1));

       ID = "" + resultsArray.get(pos + 0) + "";
       Last_Name = "" + resultsArray.get(pos + 1) + "";
       First_Name = "" + resultsArray.get(pos + 2) + "";
       Middle = "" + resultsArray.get(pos + 3) + "";
       Phone  = "" + resultsArray.get(pos + 4) + "";
       Dept_Code = "" + resultsArray.get(pos + 5) + "";
       Email  = "" + resultsArray.get(pos + 6) + "";  
       Title = "" + resultsArray.get(pos + 7) + "";
       Fax_Code = "" + resultsArray.get(pos + 8) + "";
       Loc_Code = "" + resultsArray.get(pos + 9) + "";

       System.out.println("updatestaff : ID = " + ID);
       System.out.println("updatestaff : Last_Name = " + Last_Name);
       System.out.println("updatestaff : First_Name = " + First_Name);
       System.out.println("updatestaff : Middle = " + Middle);                 
       System.out.println("updatestaff : Phone = " + Phone);
       System.out.println("updatestaff : Dept_Code = " + Dept_Code);
       System.out.println("updatestaff : Email = " + Email);
       System.out.println("updatestaff : Title = " + Title);
       System.out.println("updatestaff : Fax_Code = " + Fax_Code);                 
       System.out.println("updatestaff : Loc_Code = " + Loc_Code);

       stmt = conn.prepareStatement("UPDATE STAFFDIR SET Last_Name = ?, First_Name = ?, Middle = ?, Phone = ?, Dept_Code = ?, Email = ?, Title = ?, Fax_Code = ?, Loc_Code = ?  WHERE ID = ?");

               stmt.setString(1, Last_Name);
               stmt.setString(2, First_Name);                   
               stmt.setString(3, Middle);
               stmt.setString(4, Phone);
           Integer DC = Integer.valueOf(Dept_Code);

           System.out.println("updatestaff: Dept_Code = " + Dept_Code);

               stmt.setInt(5, DC);
               stmt.setString(6, Email);
               stmt.setString(7, Title);
               if ((Fax_Code == null) || (Fax_Code.equals("")) || (Fax_Code.equals("null"))) {
                    Fax_Code = "999";
               }

           System.out.println("updatestaff: Fax_Code = " + Fax_Code);  

           Integer FC = Integer.valueOf(Fax_Code);
               stmt.setInt(8, FC);
           Integer LC = Integer.valueOf(Loc_Code);

           System.out.println("updatestaff: Loc_Code = " + Loc_Code);

               stmt.setInt(9, LC);                 
       stmt.setString(10, ID);
               int rc = stmt.executeUpdate(); 

               System.out.println("update : rc = " + rc);

               SQLWarning warning = conn.getWarnings();
               while (warning != null)
               {
                 System.out.println(warning.getMessage());
                 warning = warning.getNextWarning();
               }

               pos = pos + 14;     
       }       
       response.sendRedirect(response.encodeRedirectURL("/phonebk/updatestaff.jsp"));  
    } // End of try

