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, 1537🔥, 0💬
Popular Posts:
How To Update Multiple Rows with One UPDATE Statement in SQL Server? If the WHERE clause in an UPDAT...
How to download Microsoft SQL Server 2005 Express Edition in SQL Server? Microsoft SQL Server 2005 E...
How To Fix the INSERT Command Denied Error in MySQL? The reason for getting the "1142: INSERT comman...
What are DDL (Data Definition Language) statements for tables in SQL Server? DDL (Data Definition La...
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can u...