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);

 

posted on 2017-11-16 20:02  杨杨yang  阅读(114)  评论(0编辑  收藏  举报