1.procedure can use the return statement to return the control back to calling subprogram.
2.function can return a values as well it can be used anywhere in a SQL statement.
create or replace procedure proc_highpayee
as
varEno NUMBER default 0;
begin
select eno into varEno from emp where sal = (select max(sal)from emp) and rownum =1;
return;
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE ('No Data found for SELECT ');
end;
Sunday, June 21, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment