mysql - Pl/SQL package including yearly salary calculation function -



mysql - Pl/SQL package including yearly salary calculation function -

i need help in creating bundle in pl/sql following: bundle containing 1 function , 1 procedure. function calculates yearly salary of particular employee , yearly salary inserted table employee id using procedure. here tried don't know how add together procedure insert values "particular_emp" table

create table particular_emp ( salary string not null, emp_id number not null ); create or replace bundle salary create or replace function get_yearly_salary(p_sal in employees.salary%type, p_comm in employees.commission_pct%type) homecoming number begin homecoming (nvl(p_sal, 0) * 12 + (nvl(p_comm, 0) * nvl(p_sal, 0) * 12)); end get_yearly_salary;

here how did , working!

create or replace bundle empinfo function ysalary(p_empno in number) homecoming number; procedure insertsal (p_empno in number); end empinfo; / create or replace bundle body empinfo function ysalary(p_empno in number) homecoming number vsal integer; begin vsal :=200; vsal :=200*12; exception when no_data_found dmbs_output.put_line('no info available'); end; procedure insertsal(p_empno in number) begin insert employeesalary values(200,ysalary(1)); exception when no_data_found dbms_output.put_line('no data'); end; end empinfo; /

mysql sql oracle plsql

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -