50438p Se252 God
50438p Se252 God
2 50438 (P)/SE252
3. (a) Write a query to the list of all students who were fail in the
particular subject and also find max marks in sub 1 and
average of sub 2 from total 5 subjects.
(b) Write PL/SQL queries to create Triggers.
9. (a) Create an employee data base and divided into certain the
database into certain departments and each department
consists of employees. The following two tables describes
the schemes.
Dept_table (deptno, dname, loc)
Emp_table (empno, ename, job, mgr, hiredate, sal, comm,
deptno)
(i) Update the employee salary by 15%, whose
experience is greater than 10 years.
(ii) Delete the employees, who completed 30 years of
service.
(iii) Display the manager who is having maximum
number of employees working under him?
(iv) Create a view, which contain employee names and
their manager.
Generate a report of employees who gets more than
20000 salary.
(b) Write PL/SQL queries to create Triggers.
4 50438 (P)/SE252
5 50438 (P)/SE252
6 50438 (P)/SE252
7 50438 (P)/SE252
21. (a) To write a Cursor to display the list of employees who are
Working as a Managers or Analyst
(b) Create “Employee” table with personal and salary details.
(i) By using the group by clause, display the enames who
belongs to deptno 10 along with average salary.
(ii) Display lowest paid employee details under each
department.
(iii) Display number of employees working in each
department and their department number.
(iv) Using built in functions, display number of employees
working in each department and their department
name from dept table. Insert deptname to dept table
and insert deptname for each row, do the required
thing specified above.
(v) List all employees which start with either B or C.
(vi) Display only these ename of employees where the
maximum salary is greater than or equal to 5000.
23. (a) Design “Employee” database with your own data and
perform the following.
(i) Show that two substring as single string.
(ii) List all employee names, salary and 15% rise in
salary.
(iii) Display lowest paid emp details under each manager
(iv) Display the average monthly salary bill for each
deptno.
(v) Show the average salary for all departments
employing more than two people.
(vi) By using the group by clause, display the eid who
belongs to deptno 05 along with average salary.
(b) Write PL/SQL code to display Employee details using
Explicit Cursors.
9 50438 (P)/SE252
10 50438 (P)/SE252
___________________
11 50438 (P)/SE252