Query List 41 to 45

1 min read

Query List

41. List the employees who joined on 25-JAN-81, 09-MAY-81, 05-NOV-81, 04- JUN-80 in asc order of seniority. 

 Query:

Select * from employee where hire_date in ('25-JAN-81', '09-MAY-81', '05-NOV81', '04-JUN-80') order by hire_date asc; 

Output:

42. List the employees who are joined in the month of Jan 1982. 

Query: 

Select * from employee where hire_date between '01-Jan-82' and '31-Jan-82'; 

(OR) 

Query: 

Select * from employee where to_char(hire_date, 'mon-yyyy') ='jan-1982'; 

Output:


43. List the Enames those are starting with ‘A’ and with five characters. 

 Query: 

Select ename from employee where ename like 'A%' and length (ename) = 5; 

Output: 


44. List the emps those are having six chars and fourth character must be ‘e’.

 Query: 

Select * from employee where length(ename) = 6 and ename like '___e%'; 

 Output:



45. List the six character names starting with ‘R’ and ending with ‘h’.

 Query: 

Select * from employee where length(ename) = 6 and ename like ‘R%h’; 

 Output: 












You may like these posts

  • Query List26. Query to display Name, Dept No. and Salary of any employee whose department No. and Salary match both the department no. and the salary of any employee who earns a …
  •  Query List11. Query to display the Name, Salary and Commission for all the employees who earn commission. Sort the data in descending order of Salary and Commission. Q…
  • Query List21. Query to display Name, Department Name and Department No for all the employees. Query: Select EMPLOYEE.Ename, DEPARTMENT.Dname, EMPLOYEE.Dno from EMPLOYEE …
  • Query List36. Query to display the department no, name and job for all employees in the Sales department.  Query: Select e.Dno, e.Ename, e.Job_type from EMPLOYEE e,…
  • Query List31. Query to display the Department Name, Location Name, No. of Employees and the average salary for all employees in that department.  Query 1: Select Dn…
  •  Query List16. Query to display Name, Hire Date and Salary Review Date which is the 1st Monday after six months of employment. Query: Select Ename, Hire_date, Salar…

Post a Comment

© 2025DBMS. The Best Codder All rights reserved. Distributed by