이번엔 저장 프로시저에 대해서 알아 볼 것 이다.
저장 프로시저
저장 프로시저를 사용해서 어느 작업을 하는 프로시저를 작성해두면 데이터베이스에 저장되므로 나중에 필요하면 몇 번이고 불러서 실행하기만 하면 된다.
●예제
create or replace procedure h_world
is
l_message varchar2(100) := 'Hello world!!';
begin
dbms_output.put_line(l_message);
end;
/
exec h_world;
select object_name, status from user_objects
where object_name = 'H_WORLD';
select object_name, object_type from user_objects
where object_type = 'PROCEDURE';
select text from user_source
where name = 'H_WORLD';
'DB > SQLPLUS' 카테고리의 다른 글
| [ORACLE] 트리거(Trigger) (0) | 2022.06.20 |
|---|---|
| [ORACLE] Cursor(커서) (0) | 2022.06.20 |
| [ORACLE] data dictionary (0) | 2022.06.20 |
| [ORACLE] MERGE(머지) (0) | 2022.06.20 |
| [ORACLE] Sysnonym(동의어) (0) | 2022.06.20 |
댓글