Pages

Ads 468x60px

Sunday, 3 June 2012

PL SQL Program For TO RETRIEVE THE RECORDS OF THE EMPLOYEE.


PL SQL Program For TO RETRIEVE THE RECORDS OF THE EMPLOYEE. 


declare
no emp.empno %type;
name emp.emp_name %type;
sal emp.salary %type;
begin 
no:=&no;
select emp_name,salary into name,sal from emp where empno=no;
dbms_output.put_line(' DETAILS OF THE EMPLOYEE WHOSE EMPLOYEE NO IS '||no);
dbms_output.put_line('Name of the Employee : ' || name);
dbms_output.put_line('Salary of the Employee : ' || sal);
exception
when No_data_found then
dbms_output.put_line('The Employee Number ' || no || ' Not Found');
end; 

0 comments:

Post a Comment

Total Pageviews