Query List 6 to 7

1 min read

 Query List

6. Query to display Employee Name and Department Number for the Employee No = E90. 
Query: 

Select Ename, Dno from EMPLOYEE where Eno='E90';

 Output:


7. Query to display Employee Name and Salary for all employees whose salary is not in the range of ₹15000 and ₹28500.

 Query: 

Select Ename, Salary from EMPLOYEE where Salary NOT BETWEEN 15000 AND 28500; 

Output: 

8. Query to display Employee Name and Department No of all the employees in Dept 101 and Dept 301 in the alphabetical order by name.

 Query 1: 

Select Ename, Dno from EMPLOYEE where Dno IN(101,301) ORDER BY Ename; 

Query 2: Select Ename, Dno from EMPLOYEE where DNO = 101 OR DNO = 301 ORDER BY Ename;

 Output:

9. Query to display Name and Hire Date of every Employee who was hired in 1981. 

 Query 1: 

Select Ename, Hire_date from EMPLOYEE where Hire_date BETWEEN '31-DEC-1980' AND '1-JAN-1982'; 

Query 2:

 Select Ename, Hire_date from EMPLOYEE where Hire_date LIKE '%81'; 

Query 3: 

Select Ename, Hire_date from EMPLOYEE where TO_CHAR(Hire_date, 'YY') = '81'; 

Output:

10. Query to display Name and Job of all employees who don’t have a current Manager. 

 Query: 

Select Ename, Job_type from EMPLOYEE where Manager IS NULL; 

output: 












You may like these posts

  •  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…
  • 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 List41. 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 ('2…
  • 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 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 List21. Query to display Name, Department Name and Department No for all the employees. Query: Select EMPLOYEE.Ename, DEPARTMENT.Dname, EMPLOYEE.Dno from EMPLOYEE …

Post a Comment

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