Oracle: List the employees who are joined in the year between '01-Jan-2004' and '31-Dec-2008'
Oracle Operator: Exercise-14 with Solution
Write a query to list the employees who are joined in the year between '01-Jan-2004' and '31-Dec-2008'.
Sample table : employees
Sample Solution:
Oracle Code:
SELECT *
FROM employees
WHERE HIRE_DATE between ’01-jan-2004’ and ’31-dec-2008’;
Output:
EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL PHONE_NUMBER HIRE_DATE JOB_ID SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID ----------- -------------------- ------------------------- ------------------------- -------------------- --------- ---------- ---------- -------------- ---------- ------------- 101 Neena Kochhar NKOCHHAR 515.123.4568 21-SEP-05 AD_VP 17000 100 90 103 Alexander Hunold AHUNOLD 590.423.4567 03-JAN-06 IT_PROG 9000 102 60 104 Bruce Ernst BERNST 590.423.4568 21-MAY-07 IT_PROG 6000 103 60 105 David Austin DAUSTIN 590.423.4569 25-JUN-05 IT_PROG 4800 103 60 106 Valli Pataballa VPATABAL 590.423.4560 05-FEB-06 IT_PROG 4800 103 60 107 Diana Lorentz DLORENTZ 590.423.5567 07-FEB-07 IT_PROG 4200 103 60 ....... 93 rows selected.
Pictorial Presentation:
Improve this sample solution and post your code through Disqus.
Previous: Write a query to concatenate first name, last name and job id from employees table in the following format.
Next: Oracle Wildcard special Operators
What is the difficulty level of this exercise?
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/oracle-exercises/operator/oracle-operator-exercise-14.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics