question:How to alter department in PMS system
1.Use generally method modified department;
update emp set deptno='department code' where empno='employee department';
2.Use procedure modified department.
The following coding in the sql windows.
CREATE OR REPLACE PROCEDURE emp_cha_deptno( p_deptno IN NUMBER, p_empno IN NUMBER) IS BEGIN UPDATE emp SET deptno=p_deptno WHERE empno=p_empno; COMMIT; END;
The belowing coding in the command windows
execute emp_cha_deptno(20,7369);