Xi Ip-worksheet 1 - Basic SQL Query
Xi Ip-worksheet 1 - Basic SQL Query
Write SQL queries to perform the following operations on the above table “EMP” :
Q1. Display employee name and their Date of Birth.
Q2. Display names of all employees along with their annual salary (Salary*12).
While displaying query result, rename EName as Name also rename Salary*12 column as
Annual Salary.
Q3.To display unique department number for all the employees.
Q4.Display all the employees who are earning more than 5000 and work in DeptNO 20.
Q5.Displays records of all the employees except HONEY and PREM.
Q6. Display name and department number of all those employees who are earning salary
between 20000 and 50000 (both values inclusive).
Q7. Display details of all the employees who are working either in Dept No 20 or 30 or 40
Q8. Display details of all those employees who are not getting any salary.
Q9. Display names of all the employees who have been getting some salary.
Q10. Displays details of all those employees whose name starts with 'K'
Q11. Displays details of all those employees whose name ends with 'a'
Q12. Displays names of all the employees containing 'se' as a substring in name
Q13. Displays names of all employees containing 'a' as the second character
Q14. Display name
Increase of youngest
the salary employee.
of all salesmen by 5%.
Q16. Display
Insertname
detail of
of employee getting highest
one more employee. Use anysalary.
data of your choice.
Q18. Display name of employees whose HIRE DATE is not given ( it is unknown / NULL).
Q19. Display name of employees whose name contains exactly 5 characters.
Q20. Display name of clerks who are working in Deptt No 20 .