Saturday, December 20, 2008

Simple PL/SQL program

SQL> VARIABLE RESULT NUMBER;
SQL> BEGIN
2 SELECT max(salary) INTO :RESULT FROM top_dogs;
3 END;
4 /

PL/SQL procedure successfully completed.

SQL> print RESULT;

RESULT
----------
250000
SQL>

No comments:

Post a Comment