Before executing one needs to ensure that the flag Set serveroutput is ON (Set serveroutput ON;) to get the output on the console.
PL/SQL is a combination of SQL along with the procedural features of programming languages. It was developed by Oracle Corporation in the early ’90s to enhance the capabilities of SQL. PL/SQL is one of three key programming languages embedded in the Oracle Database, along with SQL itself and Java. This tutorial will give you a great understanding of PL/SQL to proceed with the Oracle database and other advanced RDBMS concepts.
Execution steps for pl/sql:
1. Create and open a file with vi editor
The default editor that comes with the UNIX operating system is called vi (visual editor). Using vi editor, we can edit an existing file or create a new file from scratch.
2. Write the code there
3. Press ‘Esc’ then type ‘:wq’ to save the file
4. Run and execute the pl/sql program by typing the query SQL>@filename.sql
OR simple execution step for pl/sql:
Press / at the end of .sql file and Run SQL>@filename.sql