Collections:
Define an Anonymous Block in Oracle
How To Define an Anonymous Block in Oracle?
✍: FYIcenter.com
An anonymous block must have an execution part, which is a group of other PL/SQL statements enclosed in the BEGIN ... END statement. Here is a script on how to define a simple anonymous block with SQL*Plus:
SQL> set serveroutput on;
SQL> begin
2 dbms_output.put_line('Hello world!');
3 end;
4 /
Hello world!
PL/SQL procedure successfully completed.
"set serveroutput on;" allows dbms_output.put_line() to work.
"/" runs the anonymous block, which print the "Hello world!" message.
⇒ How Many Anonymous Blocks Can Be Defined in Oracle
⇐ Types of PL/SQL Code Blocks in Oracle
2018-10-30, 3107🔥, 0💬
Popular Posts:
How to obtain the version number of the ICU (International Components for Unicode) library using the...
How to calculate the storage size of a JSON (JavaScript Object Notation) value using the JSON_STORAG...
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Ex...
How To Provide Default Values to Function Parameters in SQL Server Transact-SQL? If you add a parame...
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to...