I am a new beginner with PL/SQL and I m trying to resolve these puzzles. if you can shed some light on how can I start this procedures that will be great.
جزاكم الله خيرا
1) Create a stored procedure, which will display the name and hiredate from a person.
The empno of the person will be the IN parameter to pass in to invoke the stored procedure.
The hire date will be in the display format of 'Mon dd, yyyy, Day'. (May 01, 1988 Tue, for exampe).
Use chr(10) so that the name and hiredate will be displayed in different line.
show_hire_date (empno);
2) Create a stored procedure, which will give a entire department a raise. The depno will be the 'IN' parameter.
The number of rows updated will be the 'OUT' parameter. (use sql%rowcount). Print the number of updates on the screen.
dept_pay_raise (deptno);
3) Create a store procedure, which takes the 'IN' parameter to create new a employee
* empno:
You will need get the max or the greatest (empno) from the emp table, add 5 to it, and use that as the empno.
* hiredate:
use sysdate
* sal
Get the avg from the emp table. The sal for the new employee will be the avg * 110%.
* comm
Get the avg commission from the emp table. The new employee will have the commission of (avg * 105%)
Commit the transaction inside the stored procedure.
The syntax to invoke the stored procedure will be:
create_new_emp (ename,job, manager, deptno);
