1. A. Create the Two tables based on the following table instance charts.

Choose the appropriate data types and be sure to add integrity constraints and perform manipulate operations. Table name: EMPLOYEE Column Name Key type Null/unique Check Data type length Varchar2 100 number 10 date NN Emp name PK NN NN IT,ECE,EEE Varchar2 100 number 20 Varchar2 100 Emp_id Joining date Dept name salary address

Table name: Email_id Column Name Key type Null/unique Check Data type length Varchar2 100 number 10 NN,U PK,FK NN Email_id Emp_id

B. Write a stored procedure to retrieve common details of Emp_id, Emp_name, dept name, salary, email _id in both the tables.(Use Emplolyee, Email tables)

2. A. Employee(empname, empno, salary, joiningdate, deptno, designation) Department(deptno, deptname)

i. ii. iii.

Write a SQL Query to display the department no, maximum average salary in department wise from the employee table. Write a SQL Query to count the number of employees with the same designation. Write a SQL query to retrieves all rows in the EMPLOYEES table, even if there is no match in the DEPARTMENTS table. It also retrieves all rows in the DEPARTMENTS table, even if there is no match in the EMPLOYEES table.

iv.

cross products of two tables.

B. Execute a VB Program to perform purchase control for any application.

3. A. Employee(empname, empno, salary, joiningdate, deptno, designation)

Write a SQL Query to display the maximum and minimum marks in department wise from the student table. deptno. To create a simple wordpad application using menu editor. B. Salary. salaries. Write a SQL Query to displays the number of distinct phone number values in the MEMBER table. deptname) i. Create the tables based on the following table instance charts. Create a query to display the employee numbers and employee names of all employees who more than the average salary. Label the columns Employee.Department(deptno. Sort the results in ascending order of salary. DEPARTMENTS tables. joiningdate. ii. A. lowest. Create a view called SALARY_VU based on the employee names. Retrieve the data from the view. Write a SQL Query to display the number of phone number values in the MEMBER tables. empno. Write a SQL query to retrieves all rows in the EMPLOYEES table. Write a PL/SQL Function Program to find a netpay for a given basic salary(payroll processing) earn 4. . ii. Use the EMPLOYEES. iii. B. and designation for all employees. Choose the appropriate data types and be sure to add integrity constraints and perform manipulate operations. and designation. Write a SQL Query to displays the details of all employees whose salary is equal to the minimum salary. designation) Department(deptno. iii. B. Department. 5. Write a SQL Query to displays the average. salary. iv. Execute a VB Program to perform inventory control for any application and generate the reports. deptname) i. highest. A. which is the left table even if there is no match in the DEPARTMENTS table. Table name: MEMBER 1. and sum of monthly salaries for all Lecturer. department names. respectively. 2. Employee(empname. v. Retrieving Records with natural join.

000. deptno. Create a query to display the employee name and salary of employees earning more than $12.500. ii.500. The SELECT statement on the slide returns rows from the EMPLOYEES table for any employee whose salary is between $2. Label the column Date. B. Employee(empname. Write a two trigger program(before .000. Write a query that displays the difference between the highest and lowest salaries. deptno. Write a SQL query to display the employee name and salary for all employees whose salary is not in the range of $5. vii. vi. B. designation) Department(deptno. B. iii. Write a PL/SQL Procedure to calling a Function whether to find the employee no 7. Attempt to reassign employee name =’sam’ in department no 80. .after update) 8. iii. salaries. salary. Employee(empname. A. designation) i. create a view by using column aliases in the sub query. Label the column DIFFERENCE. deptno. vi. salary. Sort data in descending order of salary and department no. Display the employee name. 1998. empno. $3. job ID. Write a query to display the current date. v. Select all data from the table.000 and $12. and start date of employees hired between February 20. salary. Employee(empname. joiningdate. and May 1. Display the employee names of all employees where the third letter of the name is an a. Display the employee name and salary of employees who earn between $5. joiningdate. and are in department 20 or 50. or $7. Create a query to display the employee name and department number for employee number 176. A. A. Display the structure and contents of the employee_view view. Write a query to displays the employee names and joining dates of all employees who joined between January 2008 and December 2009: v.500. . empno. Display the employee employee name. create a view employee_view that contains details of employees in department “80” ii. Label the columns Employee and Monthly Salary.000 and $12. or 201 iv. salary. empno. Display the employee name. Write a query to displays employee numbers. iv. employee names. ii. Write a PL/SQL Function Program to find a given no is odd or even.500 and $3. Show the structure of the DEPARTMENTS table. iii. 101. and department no for all employees .000. respectively V. designation) i. joiningdate. deptname) i. Order the query in ascending order by start date. Display the employee name and department number of all employees in departments 20 and 50 in alphabetical order by name. vi. and dept numbers for all the employees whose dept number is 100. 1998. and salary for all employees whose designation is lecture or clerk and whose salary is not equal to $2. designation. iv.6.000.

ii. joiningdate. designation in both the tables. joining date. vii. Write a SQL Query to displays the details of all employees whose salary is equal to the maximum salary. deptname. Write a query to display the employee name. ii.9. . vi. deptno. salary. 10. Write a PL/SQL Function Program to find a average marks for a given set of marks. Write a PL/SQL Program to retrieve common details of empno. Create a query to display the employee name and department number for employee number 176.000. A. A. iii. Find the employees who earn the same salary as the minimum salary for each department. Employee(empname. A. joiningdate. Write a SQL query to retrieves all rows in the DEPARTMENTS table. B. iii. empno. Employee(empname. deptname) i. empname. Write a PL/SQL Procedure to calling a Function whether to find a average marks for a given set of marks. Discard the most recent DELETE operation without discarding the earlier INSERT operation. deptname) i. 11. . Empty the entire table. designation) Department(deptno. Mark an intermediate point in the processing of the transaction. department number. Write a query to displays all columns and all rows of the DEPARTMENTS table: B. deptno. departmentno. designation) Department(deptno. B. which is the right table even if there is no match in the EMPLOYEES table.000 and $12. empno. Display the employee name and department name for all employees who have an ‘a’ (lowercase) in their employee names. v. salary. Write a SQL query to display the employee name and salary for all employees whose salary is not in the range of $5. vi. and department name for all employees. iv. Execute a VB Program to perform inventory control for any application and generate the reports.

ii.000. Sort data in descending order of salary and department no. Write a PL/SQL Cursor Program to retrieve employee numbers . names and populate a database table. Label the columns Employee and Monthly Salary. Write a SQL query to display the employee name and salary for all employees whose salary is not in the range of $5. Write a PL/SQL Function Program to find a average marks for a given set of marks. salary. 10. empno.14. Display the employee name name and department number of all employees in departments 20 and 50 in alphabetical order by name. B.000. vi. 8. deptno. Employee(empname. Execute a VB Program to perform inventory control for any application and generate the reports. Execute a VB Program to perform inventory control for any application and generate the reports. Write a PL/SQL Function Program to find a given no is odd or even. $3. vi. temp_list with this information. deptno. A. respectively V. joiningdate. Execute a VB Program to perform inventory control for any application and generate the reports. A. iv. salary. designation. 1998. Display the employee name. vii. Execute a VB Program to perform inventory control for any application and generate the reports. A. 10. or $7. iii. Order the query in ascending order by start date. B. v. Create a query to display the employee name and department number for employee number 176. iii. 10. B. B. empno. A. 10.000 and $12. Create a query to display the employee name and salary of employees earning more than $12. Write a PL/SQL Function Program to find a average marks for a given set of marks. B.000. 10. and start date of employees hired between February 20. and May 1. create a view by using column aliases in the sub query. . B. Display the employee employee name. Display the employee name and salary of employees who earn between $5.000. Employee(empname. Display the employee names of all employees where the third letter of the name is an a.000 and $12. 1998. and salary for all employees whose designation is lecture or clerk and whose salary is not equal to $2. A. Display the employee name. A. Write a PL/SQL Function Program to find a average marks for a given set of marks. Write a PL/SQL Function Program to find a average marks for a given set of marks. salary. Execute a VB Program to perform inventory control for any application and generate the reports. designation) i. create a view employee_view that contains details of employees in department “80” ii. . Attempt to reassign employee name =’sam’ in department no 80. designation) i. iv. Write a PL/SQL Function Program to find a average marks for a given set of marks.500. A. job ID.500. and are in department 20 or 50. joiningdate. B. and department no for all employees . Display the structure and contents of the employee_view view.

Sign up to vote on this title
UsefulNot useful