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, 2546🔥, 0💬
Popular Posts:
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
How To List All Login Names on the Server in SQL Server? If you want to see a list of all login name...
How To Connect the Oracle Server as SYSDBA in Oracle? This is Step 4. The best way to connect to the...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How REAL and FLOAT Literal Values Are Rounded in SQL Server Transact-SQL? By definition, FLOAT(n) sh...