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, 2950🔥, 0💬
Popular Posts:
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...
How To Generate CREATE TABLE Script on an Existing Table in SQL Server? If you want to know how an e...
How To Revise and Re-Run the Last SQL Command in Oracle? If executed a long SQL statement, found a m...
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definit...
How To Connect to a MySQL Server with a Port Number in MySQL? If you want to connect a MySQL server ...