MySQL Practical File
MySQL Practical File
Final Table: -
1|P ag e
Q2) Use the above table ‘Employee’ to answer the questions: -
a) To display all the details on screen.
2|P ag e
d) To display all the details of those employees whose name begin
with ‘A’ and ends with ‘N’.
h) To insert the given data in the table: (8, ’Pooja’, NULL, ’2021-09-
09’, 90000)
3|P ag e
i) To display name and salary of the employee in the given format:
Seema earns 80000
Pooja earns 90000
4|P ag e
l) To increase the salary of all the employees by 10%.
5|P ag e
q) To change the column name Sal_PM with salary.
6|P ag e
b) To display names of ‘Aravali’ house students in upper case.
7|P ag e
e) To display no. of students of class 12D.
8|P ag e
h) To display name and house of ‘Dhauladhar’ house students.
9|P ag e
j) To display first three letters of students name.
10 | P a g e
l) To display a sub-string ‘Ven’ from Manvendra.
m)To display total marks of all the ‘Shivalik’ house students after
rounding off the fraction part.
11 | P a g e
than 1000.
Final Table: -
12 | P a g e
a) To show all information of students where capacity is more than
no. of student in order of rtno.
13 | P a g e
d) To show the names of all the transporters without repeating
their names.
e) To show all the bus routed number where the distance is less
than 30.
f) To show the area whose names end with ‘r’ in decreasing order
by area covered.
14 | P a g e
g) To show rtno, area_covered and average cost per student for all
routes where average cost per student is charges/noofstudent.
15 | P a g e
i) To show the number of areas covered by each transporter.
16 | P a g e
k) To show transporter wise total number of students traveling.
17 | P a g e
b) Display the name of all the employees along with their annual
salaries. The Salary column should be given the name “Annual
Salary”.
d) Display the details of all the employees who are getting a salary
of more than 35000 in department 30.
18 | P a g e
e) Display the details of all the employees whose salary is between
32000 and 38000.
g) Display the name, salary, and age of all the employees whose
names start with ‘M’.
19 | P a g e
h) Display the details of all the employees whose names contain ‘a’
as the second character.
20 | P a g e
k) Display the name and salary of all the employees in the
ascending order of those salaries.
21 | P a g e
m) Put the grade B for all whose grade is NULL.
22 | P a g e