This script demonstrates the structure of a block
SQL> SET SERVEROUTPUT ON SQL> SQL> DECLARE 2 myDateTime TIMESTAMP; 3 BEGIN 4 SELECT systimestamp INTO myDateTime FROM dual; 5 6 DBMS_OUTPUT.PUT_LINE(myDateTime); 7 EXCEPTION 8 WHEN OTHERS 9 THEN 10 DBMS_OUTPUT.PUT_LINE(sqlerrm); 11 END; 12 / 26-OCT-09 10.40.28.139000 AM PL/SQL procedure successfully completed. SQL>