I. IF-THEN statement
The IF-THEN statement is the simplest IF statement.
Syntax:
condition ;
Example:
: v_score ;
II. IF-THEN-ELSE statement
Compared with the IF-THEN statement, the IF-THEN-ELSE statement provides program exceptions when the conditions are not met.
Syntax:
condition ;
Example:
: v_score ;
3. IF-THEN-ELSIF statement
This statement is used when multiple different conditions exist. Note that it is ELSIF, not ELSEIF.
Syntax:
condition1 ;
Example:
: v_score ;
Iv. CASE statements
The CASE statement is the control statement structure introduced after Oracle 9i.
Syntax:
value1 value2 valuen ;
Example:
: dbms_output.put_line( dbms_output.put_line( dbms_output.put_line( dbms_output.put_line( dbms_output.put_line( dbms_output.put_line( dbms_output.put_line( dbms_output.put_line( ;
1. LOOP
LOOP is the simplest LOOP. Use the EXIT statement to EXIT the loop.
Syntax:
LOOP;
Example:
: v_num v_num ;
2. WHILE-LOOP
When a WHILE-LOOP is executed, it first determines whether the LOOP condition is TRUE. When the condition is TRUE, it begins to execute the statements in the LOOP body.
Syntax:
LOOP;
Example:
: v_num v_num;
3. FOR-LOOP
Compared with the WHILE-LOOP, the FOR-LOOP can clearly know the number of cycles and determine the LOOP range.
Syntax:
loop_count LOOP;
Example:
i ..;