Basic PL/SQL program block : Program Block « PL SQL « Oracle PL / SQL






Basic PL/SQL program block


SQL>
SQL> DECLARE
  2      x NUMBER;
  3  BEGIN
  4      x := 10;
  5
  6      DBMS_OUTPUT.PUT_LINE('X='||x);
  7  END;
  8  /
X=10

PL/SQL procedure successfully completed.

SQL>
           
       








Related examples in the same category

1.PL SQL block for start
2.Anonymous block with error handling
3.Variable scope in different program block