How Many Anonymous Blocks Can Be Defined?
SQL tutorial | Interview questions | Oracle :: Interview questions :: Introduction to PL/SQL | Interview questions
Page 1 of 1
How Many Anonymous Blocks Can Be Defined?
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.
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.
SQL tutorial | Interview questions | Oracle :: Interview questions :: Introduction to PL/SQL | Interview questions
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Sun Jan 31, 2010 12:35 am by Micheal
» Accessing tables of other users in SQL
Sun Jan 31, 2010 12:34 am by Micheal
» Grouping commands in SQL
Sun Jan 31, 2010 12:32 am by Micheal
» Operations on Result Sets in SQL
Sun Jan 31, 2010 12:31 am by Micheal
» Subqueries in SQL
Sun Jan 31, 2010 12:30 am by Micheal
» Joining Relations in SQL
Sun Jan 31, 2010 12:28 am by Micheal
» Delete comand in SQL
Sun Jan 31, 2010 12:27 am by Micheal
» Update command in SQL
Sun Jan 31, 2010 12:26 am by Micheal
» Insert command in SQL
Sun Jan 31, 2010 12:23 am by Micheal