mysql - how to prevent one sql table to be affected when updating another table -
string update_sql = "update employees set first_name=?, last_name=?, email=?, phone_number=?, hire_date=?, job_id=?, manager_id=?, department_id=? employee_id=?"; preparedstatement ps_one = connection.preparestatement(update_sql); ps_one.setstring(1, firstname); ps_one.setstring(2, lastname); ps_one.setstring(3, email_final); ps_one.setstring(4, phonenumber); ps_one.setdate(5,sqldate); ps_one.setstring(6, job); ps_one.setint(7, manager_final); ps_one.setint(8, department_final); ps_one.setint(9, id_final); ps_one.executeupdate();
here code. try update 1 table , table affected.
ora-02290: check constraint (gas.jhist_date_interval) violated ora-06512: @ "gas.add_job_history", line 10 ora-06512: @ "gas.update_job_history", line 2 ora-04088: error during execution of trigger 'gas.update_job_history'
i got error table.