0% found this document useful (0 votes)
440 views2 pages

List of Practical Exercises (ORACLE) - Set 2

This document provides a list of practical exercises for querying multiple tables in Oracle. It includes instructions to create tables for employees, companies, employee works information, and employee managers. It then lists several queries to write SQL expressions for, including finding employee names for a specific company, employee names and cities for a company, employee details for a high earning employee, and more comparative queries between employees and companies.

Uploaded by

soc11559
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
440 views2 pages

List of Practical Exercises (ORACLE) - Set 2

This document provides a list of practical exercises for querying multiple tables in Oracle. It includes instructions to create tables for employees, companies, employee works information, and employee managers. It then lists several queries to write SQL expressions for, including finding employee names for a specific company, employee names and cities for a company, employee details for a high earning employee, and more comparative queries between employees and companies.

Uploaded by

soc11559
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

List of Practical Exercises (ORACLE)

Set 2: Querying Multiple Tables

S.No Particulars DATE Signature


Consider the relations given below:
EMPLOYEE (EmployeeID, EmployeeName, Street, City)
COMPANY (CompanyID, CompanyName, City)
WORKS (EmployeeID, CompanyID, Salary)
MANAGES (EmployeeID, ManagerID)

I Create above relations using your own data types and print the
. structure of the each relation.

I Insert at least 10 records in the relation EMPLOYEE and 5


I records in the relation COMPANY. Insert appropriate records
. in the relations WORKS and MANAGES.

I Print the contents of the each relation.


I
I
.

I Give an expression in SQL with output for each of the


V following queries:
.

Find the names of all employees who work for First Bank
Corporation.
Find the names and cities of residence of all employees
who work for the First Bank Corporation.
Find the names, street, and cities of residence of all
employees who work for First Bank Corporation and earn
more than Rs. 10,000/-.
Find the employees who live in the same cities as the
companies for which they work.
Find all employees who live in the same cities and on the
same streets as do their managers.
Find all employees who do not work for First Bank
Corporation.
Find all employees who earn more than every employee of
Small Bank Corporation.
Find all companies located in every city in which Small
Bank Corporation is located.
List of Practical Exercises (ORACLE)
Find all employees who earn more than the average salary
of all employees of their company.
Find the company that has the most employees.
Find the company that has the smallest payroll.
Find those companies whose employees earn a higher
salary, on average, than the average salary at First Bank
Corporation.

You might also like