SQL> create or replace procedure gugu as
2 begin
3 for i in 1..9 loop
4 dbms_output.put_line(3||'X'||i||'='||3*i);
5 end loop;
6 end;
7 /
Procedure created.
SQL> exec dbms_output.put_line('abcdefg'); => 실행
abcdefg
PL/SQL procedure successfully completed.
SQL> l => 위에서 실행했지만 저장되지 않음
1 create or replace procedure gugu as
2 begin
3 for i in 1..9 loop
4 dbms_output.put_line(3||'X'||i||'='||3*i);
5 end loop;
6* end;
SQL>
SQL> begin => Anonymous Block으로 실행
2 dbms_output.put_line('abcdefg');
3 end;
4 /
abcdefg
PL/SQL procedure successfully completed.
SQL> l => Anonymous Block으로 실행하면 버퍼에 저장됨
1 begin
2 dbms_output.put_line('abcdefg');
3* end;
댓글 없음:
댓글 쓰기