'database/ORACLE'에 해당되는 글 93건

  1. 2009.07.06 ORACLE PROCEDURE SAMPLE

반응형

CREATE OR REPLACE PROCEDURE change_salary
(p_id IN NUMBER, p_new_sal IN NUMBER)
IS
BEGIN
UPDATE s_emp SET salary = p_new_sal WHERE id = p_id;
COMMIT;
END
change_salary;
/

 



SELECT id, salary FROM s_emp WHERE id=1;
EXEC change_salary(1,5000);
SELECT id, salary FROM s_emp WHERE id=1;

 

반응형
Posted by 공간사랑
,