Assignment DBMS
Assignment DBMS
Date : 19/07/2023
For all the questions solve it in your system, take screenshot in Mysql and
attach it here.
1. a. Create the following table in MYSQL with no as primary key and insert the given values.
13 MARKS
TABLE : EMPLOYEE
No Name Salary Zone Age Grade Dept
1 Mukul 30000 West 28 A 10
b. For the given table insert a new row with Name Sanjay and salary 20000.
c. Write query to display all the employees whose grade is A or C.
d. Write query to display those employees whose name is of 5 letters.
e. Display those employee names and their salary whose age is above
35. f. Write query to change name of Uday to Udayan.
g. Update the name of Kritika to Ritika and Salary to 20000.
h.Display employees in ascending order of salary.
i. Add a primary key No to the above table.
j. Display those employees whose age is between 30 and 40.
k. Arrange employees in increasing order of age.
l. Add a new column DOB of date type.
m. Display those employees whose name starts with K or ends with e.
n. Insert values in the column DOB.
Ans1:
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(j)
(k)
(l)
(m)
(n)
3. Consider the table FLIGHT given below. Write commands in SQL for (i) to (iv) and
output for (v) to (vi). 6 MARKS
Table : FLIGHT
Ans3.
(i)
(ii)
(iii)
(iv)
(v)
(vi)