I am writing one jdbc program ( using mysql) in which i am executing the 4 statements , using executeBatch() method of Statement .
2 insert queries --- insert two new records 1 update query ----- update a field in a row 1 delete query ----- delete a row based on some field.
here in delete query i am using the field value which doesn't exists ex : delete from student where sid=888 ; ( and student with 8888 doesn't exists)
0utput when i print constants of statement:-- x=1 (because 1 row inserted ) x=1 (because 1 row inserted ) x=2 (because 2 rows updated ) x=0 (because there are no row with sid = 888) value of SUCCESS_NO_INFO = -2 value of EXECUTE_FAILED = -3
my question is what these values means SUCCESS_NO_INFO = -2, EXECUTE_FAILED = -3 ? and also delete has not happen because no row with sid=888 still why the executeBatch is executed successfully here.?