Variable Declaration (Declare)
Aa constant number (3): = 5;
AA Constant Number (3) Default 5
v_temp number (3) Not null: = 0
Character expression 'hello' || 'world' || '!'
LIKE operator% (one or more characters) _ (match a character)
BetWeen operator 100 betWeen 110 and 120
IN operator 'scott' in '' Mike ',' [Amela ',' Fred '"
Notes / * * /
Running environment: SQL statement (;) PL / SQL (/) submit
The output is displayed:
Replace variable (&) interactive output
Select sno.sname from student where sno = & no
DBMS_OUTPUT.PUT_LINE (''); need to be added before use (Set ServerOutput on)
Result output to variables (variable)
SQL> Variable v_count number;
SQL> Begin
SELECT Count (*) INTO: V_COUNT from Student
End
/
SQL> Print v_count
NULL structure
IF N1> 90 THEN
NULL;
END IF
Circulating structure
Loop-exit-end loop
Loop-exit when-end loop
While-loop-end loop
For-in (reverse) 1..2 LOOP statement end loop