Wednesday 16 December 2015

Package With Function

As salamo alaikum wa rahmatullah

Example of package which has function

create or replace package pck_fuc
as
function today_date  return date ;
end pck_fuc;

create or replace package body pck_fuc
as

function today_date return date
is 
dt date;
begin
select sysdate into dt from dual;
return(dt);
end today_date;
end pck_fuc;
show errors

declare 
d date;
begin
d:=pck_fuc.today_date();
dbms_output.put_line(d);

end;

--

Ma Asalaam
Passion for Oracle

No comments:

Post a Comment