오라클 환경은 19c 입니다.
test.sql 파일 내용은 아래와 같습니다.
[oracle@test ~]$ pwd
/home/oracle
[oracle@test ~]$ cat test.sql
--write a bolck that outputs 'hello' and save it as test.sql
--then run this script again
begin
dbms_output.put_line('hello');
end;
실행시키는 방법은 아래와 같습니다.
SQL> SET SERVEROUTPUT ON
SQL> @/home/oracle/test.sql
4 /
hello
PL/SQL procedure successfully completed.
SQL>

'Database > PLSQL' 카테고리의 다른 글
| 006 - [Oracle PL/SQL] IF Statement (1) | 2024.02.08 |
|---|---|
| 005 - [Oracle PL/SQL] Implicit Cursor(암시적 커서) (0) | 2024.02.08 |
| 004 - [Oracle PL/SQL] Variables scope with nested blocks (0) | 2024.02.02 |
| 003 - [Oracle PL/SQL] Declaring PL/SQL Variables (0) | 2024.02.02 |
| 001 - [Oracle PL/SQL] Block Types (0) | 2024.01.31 |