December 17, 2012 at 9:40 am #2717
There are few programming question which are usually asked during PL/SQL programming job role. I have posted 5 such questions and will try to post/update more time to time.
These questions can be helpful to fresehrs or Entry level PL/SQL programmers. For any queries, please leave comment here. You can even add questions too as a comment.
- write a pl/sql to calculate area of a circle for values of radius varying from 3 to 7 and store the radius and corresponding values of calculated area in a table called area.
insert into circle values(r,a);
Write a pl/sql block to achieve the following scenario if the price of product p0001< 4000 then change price to 4000.the price is to be changed is recorded in the old price table along with product_no & date on which modification is done.
select productno,costprice into p,c from product_master where productno='p00001';
update product_master set costprice=4000 where productno='p00001';
insert into old_price values(p,c);
The manager has decided to increase the salaries of employees working as programmer by 15%. Write a pl/sql code to update salaries of employees & find out how many rows are updated.
update emp set salary=salary+(salary*.15) where job_id='IT-PROG';
write a pl/sql code that will display department no, employee name, salary of first 10 employees getting highest salary
cursor c_emp is select first_name,salary from emp,dept where dept.department_id=emp.department_id order by salary desc;
fetch c_emp into str_ename,num_salary;
exit when c_emp%rowcount = 10 or c_emp%notfound;
dbms_output.put_line(str_ename ||' '||num_salary);
create a trigger for updating operation on the employee table we need to keep track of employee’s old salary and in new salary & date on which updating is made along with employee no
create or replace trigger trig after
update of salary on emp for each row
insert into a1 values(s,eid,d);
Image Source (Logo) : http://www.downloadatoz.com/
You must be logged in to reply to this topic.