Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Government Polytechnic, Porbandar

Computer Engineering Department


Semester: 4 Subject: PPD
Practical Exercise – 5

1. Run commands from MySQL command line to do below things:


a. Start MySQL and log in
b. See list of all databases
c. Connect to particular database
d. See all available tables in particular database
2. Run queries to do below things.
a. Create below tables.

Employee
EmployeeId EmployeeName Salary DepNo ManagerId

Department
DepNo DepName

b. Insert 5 records in each table.


c. Show structure of table.
d. Show all content in Employee table.
e. Display employees whose salary is greater than 10000.
f. Display employee whose name starts with ‘A’.
g. Display name of all employees whose name ends with ‘d’.
h. Get the employee name whose name length is 5.
i. Show employees from ‘Computer’ department.
j. Find all employees from IT department and salary greater than 20000.
k. List total salary of all departments.
l. Get total salary of each department.
m. Count number of employees in each department.
n. Give 10% increment to all employees.
o. Give 5% increment to all employees whose salary is greater than 50000.

You might also like