Rss

RDBMS B.Com III Practicals

SQL
1. Display The Details Of Employees Who Have 2 A's In Their Name?
2. List The Details Of Employees Who Earn Greater Salary Than The Average?
3. Display The Details Of Dept Whose Average Salary Is Greater Than 2,000?
4. List The Number Of Clerks and Managers Department Wise If Both Are > 3?
5. Display The Details Of Employees Who Joined In February And Year 1991
6. List The Names Of All Employees Whose Name Has More Than 5 Characters And Less Than 8 Characters?
7. Display The Dept Which Has More Than 3 Employees?
8. List The Employee Details Along With Their Managers?
9. Find The Dept Which Has Maximum Number Of Employees?
10. List The Dname,Dept_No,Loc In Which Number Of Employees Have Been Recruited?
11. List the year in which maximum number of employees were recruited.
12. Display The Dept Details Which Has Maximum sum Of Salaries?
13. List The Names Of All Employees Who Doesn't Work In Accounting Dept_No?
14. Display The List Of Employees Whose Name Ends With 'R'?
15. Change The Default Display Like For Dept_No 10 As Financial Dept, For 20 Accounts Dept. For 30 Management Information System, And For 40 Electronic Data Processing?
16. List The Department Which Doesn't Have Any Employees.[If It Is Not There Try With A New Table
17. Display Empno,Ename,Sal Prefixed With A Dollar Sign And In Descending
Order with The Job As Managers?
18. List the EMP details who earns third highest salary.
19. Write A Query To Delete Duplicate Record?
20. Display department numbers and total number of employees working in each department.
21. Display the various jobs and total number of employees within each job group.
22. Display the names of the employees who earn highest salary in their respective departments.
23. Display the names of the employees inUppercase.
24. Display the names of the employees in Lowercase.
25. Display the names of the employees in Proper case.
26. User appropriate function and extract 3 characters starting from 2c haracters from the following string 'Oracle', i.e the output should be 'rac'.
27. Replace every occurrence of alphabet A with B in the string Allens (use translate function)
28. Display name and salary of ford if his salary is equal to highest sal of his grade.
29. Display the employee name, job and his manager. Display also employee who is without manager?
30. Display the grade of Jones?
31. Print the details of all the employees who are Sub-ordinate to BLAKE?
32. Display the 10th record of emp table (without using rowid)
33. Create a copy of emp table;
34. Display those employees name as follows
A ALLEN
B BLAKE
35. Delete the rows of employees who are working in the company for more than 2 years.
36. If any employee has commission his commission should be incremented by 10% of his salary.
37. Display employee name and his manager name.
38. Write a Query To Delete The Repeted Rows from emp table;
39. Display all rows from EMP table. The system should wait after every Screen full of information.
40. Create table empy with only one column empno;
41. Add this column to emp table ename varchar2(20).
42. Oops I forgot to give the primary key constraint. Add it now.
43. Now increase the length of ename column to 30 characters.
44. Add salary column to empy table.
45. 1 want to give a validation saying that salary cannot be greater 10, 000(note: give a name to this constraint)
46. This column mgr should be related to empno. Give a command to add this constraint.
47. How do you create a view for EMP table?
48. How do you drop a table or a view?
49. Display The List Of Employees Whose Name Starts With 'R' And Has Only 4 Characters In It?
50. Create a sequence and then get the next value.
51. Create a sequence detno_seq start with 50 increment by 10.
52. Display the odd records from EMP table.
53. Display the even records from EMP table.

PL/SQL
1) Write a PL/SQL block to add two numbers.
2) Write a PL/SQL block to add two numbers by accepting variables.
3) Write a PL/SQL block to find the sum of salaries from the default table EMP.
4) Write a PL/SQL block to print 1 to 10 using loop.
5) Write a PL/SQL block to reverse of 1 to 10 using while.
6) Write the above program using loop.
7) Write a PL/SQL block to find Sum of Digits of a given Number.
8) Write a PL/SQL program to find the factorial of a given number
9) Write a PL/SQL program to find the reverse of a given number.
10) Write a PL/SQL program to find the average salary from the EMP table.
11) Write a PL/SQL block to display the salary of SMITH.
12) Write a program to find the given string is Palindrome or not.
13) Write a Cursor to display List of Employees from Emp Table in PL/SQL block
14) Write a PL/SQL block for checking Armstrong number
15) Write a cursor to display the first 3 rows of employee names.
16) Write a cursor to display the third highest salary details of BMP.
17) Write a cursor to display the 4th row from BMP table.
18) Write a cursor by accepting deptno to display the employee names.
19) List the details of employees by jobwise.
20) List the details of employees by department wise
21) To hike a sal by 500,400,300 for job MANAGER, CLERK, others respectively.
22) Write an exception handling for employee with possible errors by inputing.
23) Above program should display Too many rows exceptions.
24) Create a function to find the factorial of a given number.
25) Create a procedure to find the factorial of a given number.
26) Write a trigger to display the message when inserting a record.
27) Write a trigger to display the message Before inserting a record
28) Write a trigger to restrict the user either to update/delete/insert/modify on Sunday