Lab Exam Model Questions
Lab Exam Model Questions
Question 2:
Create the Company database with the following tables and do the following:
Administration(employee_salary, development _cost, fund_amount, turn_over,bonus)Emp_details
(emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
i. Calculate the total and average salary amount of the employees of each department.
ii. Display total salary spent for employees.
iii. Perform cartesian product, union intersection.
Question 1:
(Exercise on order by and group by clauses) Create Sales table with the following fields( Sales No,
Salesname, Branch, Salesamount, DOB)
( a ) Insert five records
( b ) Calculate total salesamount in each branch
( c ) Calculate average salesamount in each branch .
( d ) Display all the salesmen, DOB who are born in December as day in character format i.e. 21-Dec-
09
( e ) Display the name and DOB of salesman in alphabetical order of the month.
Question 2:
Create an Emp table with the following fields:(EmpNo, EmpName, Job,Basic, DA, HRA,PF,
GrossPay, NetPay)
(Calculate DA as 30% of Basic and HRA as 40% of Basic)
( a ) Insert Five Records and calculate GrossPay and NetPay.Question 1:
Employee Database An Enterprise wishes to maintain a database to automate its operations. Enterprise is
divided into certain departments and each department consists of employees. The following two tables describes
the automation schemas
Dept (deptno, dname, loc)
Emp (empno, ename, job, mgr, hiredate, sal, comm, deptno)
a)Update the employee salary by 15%, whose experience is greater than 10 years.
Question 1:
Consider the following tables namely “DEPARTMENTS” and “EMPLOYEES” Their schemas are as
follows,
Departments ( dept _no , dept_ name , dept_location );
Employees (emp_id , emp_name , emp_salary,dept_no);
a)Develop a query to grant all privileges of employees table into departments table
b)Develop a query to grant some privileges of employees table into departments table
c)Develop a query to revoke all privileges of employees table from departments table
d)Develop a query to revoke some privileges of employees table from departments table
e)Write a query to implement the save point.
Question 2:
Using the tables “DEPARTMENTS” and “EMPLOYEES” perform the following queries
a)Display the employee details, departments that the departments are same in both the emp and dept.
b)Display the employee name and Department name by implementing a left outer join.
c)Perform union, intersection
d)Display the details of those who draw a salary greater than the average salary.
Question 1:
Create an Emp table with the following fields:
(EmpNo, EmpName, Job,Basic, DA, HRA,PF, GrossPay, NetPay) (Calculate DA as 30% of Basic
and HRA as 40% of Basic)
( a ) Insert Five Records and calculate GrossPay and NetPay.
( b ) Display the employees whose Basic is lowest in each department .
( c ) If NetPay is less than <Rs. 10,000 add Rs. 1200 as special allowances .
( d ) Display the employees whose GrossPay lies between 10,000 & 20,000 ( e ) Display all the
employees who earn maximum salary .
Question 2:
Create the Company database with the following tables and do the
following:Administration(employee_salary, development _cost, fund_amount,
turn_over,bonus)Emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
i.Calculate the total and average salary amount of the employees of each department.
ii.Display total salary spent for employees.
iii.Aggregate function
iii.alter command
iv.delete coomand