In pl \ SQL, the process control method block www.2cto.com Java code declare username varchar2 (20); begin select t. ename into username from emp t where rownum = 1; dbms_output.put_line (username); end; 2 use case when in oracle for Java code www.2cto.com declare age number (6, 2 ); ---- Here the six represents the total length, and 2 represents the length after the decimal point begin age: = & myage; case age when 10 then dbms_output.put_line ('you have 10 year '); when 20 then dbms_output.put_line ('you have 20 year'); when 30 then dbms_output.put_line ('you have 3o year'); else hour ('I donot know you age '); end case; end; 3 usage of loop in oracle declare q number: = 0; begin loop q: = q + 1; dbms_output.put_line ('q = '| q); exit when q = 10; end loop; end; 4. another exit method in loop: www.2cto.com Java code declare q number: = 0; begin loop q: = q + 1; dbms_output.put_line ('q = '| q ); if q = 10 then exit; end if; end loop; dbms_output.put_line ('Hello I barek '); --- after exit, end is executed. another Java code in the loop: declare q number: = 8; begin while q <100 loop q: = q + 1; dbms_output.put_line ('Hello world good '); end loop; end; 6. java code declare q number: = 8; begin for c in 1 .. 10 loop --- add reverse dbms_output.put_line ('C is '| c); dbms_output.put_line ('Hello world good'); end loop; end; 7. usage of the goto statement www.2cto.com Java code declare sal number; begin select t. sal into sal from emp t where rownum = 1; if sal <20000 then goto a; else goto B; end if; <a> dbms_output.put_line ('this is '); <B> dbms_output.put_line ('this is B '); end;