An initialization using the assignment operator (:=) : Variable init « PL SQL « Oracle PL / SQL






An initialization using the assignment operator (:=)


SQL>
SQL> -- An initialization using the assignment operator (:=).
SQL> set serverout on;
SQL>
SQL> DECLARE
  2     X NUMBER(11,2) := 10;
  3
  4  BEGIN
  5     DBMS_OUTPUT.PUT_LINE(x);
  6  END;
  7
  8  /
10

PL/SQL procedure successfully completed.

SQL>
           
       








Related examples in the same category

1.No initial value but Has a size
2.Assign init value to a number
3.Declare variables to be used in the block