--function declaration
create or replace function func_highpayee
return number
as
varEno NUMBER default 0;
begin
select eno into varEno from emp where sal = (select max(sal)from emp) and rownum =1;
return(varEno);
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE ('No Data found for SELECT on ' );
end;
executing a proc or func:
begin
end;
exec proc-name
No comments:
Post a Comment