Can anyone please give me the answers of these questions.

From: Leader <sohelcsc_at_yahoo.com>
Date: 15 Jul 2002 22:04:37 -0700
Message-ID: <b1a93c73.0207152104.3a84528a_at_posting.google.com>


Here is the list of questions::: Thanks advance

  1. Consider the following tables:

Employee

 Emp_No	Emp_Name	Salary
E001	Mita	        5000
E002	Sanjoy	       12000
E003	Hasan     	8000
E004	Sohel	        9000
E005	Sameer	       11000
	Grade
Grade	Emp_No
A	E002
B	E005
C	E004
D	E003
E	E001


a.	Find top two highest and lowest paid employees with appropriate
cursor attributes.
b.	Find employees name and salary where grade is B and salary is
greater than 9000.
c.	Write a PL/SQL block of code that update the salaries of Hasan and
Mita 14000 and 19000, then check to see that the total salary does not exceed 50,000. If the total salary is greater than 50000 then undo update made to the salaries of Hasan and Mita. d. Write a database trigger that allows changes to employee table during the business hours (9 am to 5 pm) from Saturday to Thursday. There are no restrictions on viewing data from the table. e. Create a sequence auto_seg which will generate the number from 500 to 1 in descending order and then repeat from 1 to 500.

2. What will be the result when the following code executed Declare
X number:=10;
Begin
X:=0;
For 1 in 1..9 loop
X:=x+10;
End loop;
End

  1. 10
  2. 110
  3. 100
  4. 90
  5. How many rows will be added to the table? Begin For I in 3..10 loop If I=6 then Insert into Student values (I); Elseif I=7 then Delete from Student Endif; If I=7 then Rollback; Else Commit; Endif; End loop; Commit; End;
  6. 0
  7. 1
  8. 2
  9. None of the above.
  10. Which operations you cannot do with the ALTER as follows:
  11. Expire a Password
  12. Enable DBA privilege.
  13. Set default tablespace for table.
  14. Set default tablespace for indexes.
  15. What will be the output of the following code: Declare V_counter number(2); Begin V_counter := v_counter+1; End;
  16. 0
  17. 1
  18. null
  19. None of the above.
  20. Define the following :
  21. RDBMS
  22. Client/Server
  23. Uses of Database Trigger
  24. Data Binding
  25. Pragma.

Thanks
Hoque Received on Tue Jul 16 2002 - 07:04:37 CEST

Original text of this message