Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Use "FOR" Statements
How To Use "FOR" Statements? - Oracle DBA FAQ - Understanding PL/SQL Language Basics
✍: FYIcenter.com
If you have a block of codes to be executed repeatedly over a range of values, you can use the "FOR ... LOOP" statement. Here is a sample script on FOR statements:
DECLARE total NUMBER := 0; BEGIN FOR i IN 1..10 LOOP total := total + i; END LOOP; DBMS_OUTPUT.PUT_LINE('Total: ' || TO_CHAR(total)); END;
Note that temporary variable "i" used in the FOR loop needs no declaration. This script should print this:
Total: 55
2007-04-29, 4960👍, 0💬
Popular Posts:
How To Run "mysql" Commands from a Batch File? - MySQL FAQs - Command-Line End User Interface mysql ...
Where Do You Download JUnit? Where do I download JUnit? I don't think anyone will ask this question ...
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
Should synchronization primitives be used on overrided bean methods? No. The EJB specification speci...
If cookies are not enabled at browser end does form Authentication work? No, it does not work.