By admin | January 25, 2008

Multiple Block handling in PL/SQL

This example will demonstrate the performance of different blocks. The golden rule is followed - first inner, then outer

<> — Block Name
DECLARE
X NUMBER;
BEGIN
X:=1;
WHILE X<5
LOOP
DBMS_OUTPUT.PUT_LINE (X);
<> –Block Name
DECLARE
X NUMBER;
BEGIN
X:=1;
WHILE X<3
LOOP
DBMS_OUTPUT.PUT_LINE(X||’ ‘||OUTER.X);
X:=X+1;
END LOOP;
END;
X:=X+1;
END LOOP;
END;

Digg Facebook Technorati Bloglines

Email This Post Email This Post
Topics: Database |



Leave a Comment

Name:

E-Mail :

Website :

Comments :

Ad

Calendar

January 2009
M T W T F S S
« Oct «-»  
 1234
567891011
12131415161718
19202122232425
262728293031  

Search

Polls

  • Who will rule the world?

    View Results

    Loading ... Loading ...