SQL tutorial | Interview questions | Oracle
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How Many Anonymous Blocks Can Be Defined?

Go down

How Many Anonymous Blocks Can Be Defined? Empty How Many Anonymous Blocks Can Be Defined?

Post by Micheal Tue Jan 19, 2010 7:46 pm

An anonymous block is stored in the user's current session without any name. So you can only define one anonymous block at any time. If you define another anonymous block, the new block will replace the previously defined block, as shown in the following script:
SQL> set serveroutput on;
SQL> begin
2 dbms_output.put_line('Hello world!');
3 end;
4 /
Hello world!
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_output.put_line('This is a PL/SQL FAQ.');
3 end;
4 /
This is a PL/SQL FAQ.
PL/SQL procedure successfully completed.

Micheal
Admin

Posts : 243
Join date : 2010-01-10

http://sql-tutorial.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum