- UPDATE emp SET department_id = 29 WHERE department_id = 30;
- insert or update on table "emp" violates foreign key constraint "emp_ref_dept_fk"
- Key (deptno)=(29) is not present in table "dept"
- Department 29 does not exist
Query :
- DELETE FROM departments WHERE department_id = 60;
- update or delete on table "dept" violates foreign key constraint "emp_re f_dept_fk" on table "emp";
- Key (deptno)=(10) is still referenced from table "emp".
No comments:
Post a Comment