IP PracticalLIST-SQL
IP PracticalLIST-SQL
22
Objective: Understanding the use of MySQL queries.
6 Add one column State of data type VARCHAR and size 30 to table
DEPT Ans: alter table DEPT
Add(state varchar(30));
EMP
9 Write a query to display EmpName and Sal of employees whose salary are greater than or
to 2200
10 Write a query to display details of employees who are not getting commission.
11 Write a query to display employee name and salary of those employees who don’t have th
salary in range of 2500 to 4000.
21
12 Write a query to display the name of employee whose name contains “A” as third
alphabet in Ascending order of employee names.
13 Display the sum of salary and commission of employees as “Total Incentive” who
are getting commission
14 Show the average salary for all departments with more than 5 working
people.
20. NOT DONE Update all the records as add ‘Mr.’ with
EmpName. Ans:
21. Display the name of Employees who is working in SALES department.
Ans:
22. NOT DONE Drop the
emp table.
31. Set the commission as 100 who are not getting any commission.