Oracle: List the name, hire date of all the employees who joined on 1-JUL-2006, 24-MAR-2007, 04-JAN-2008 in ascending order of seniority
Oracle Operator: Exercise-12 with Solution
Write query to list the name (first and last name), hire date of all the employees who joined on 1-JUL-2006, 24-MAR-2007, 04-JAN-2008 in ascending order of seniority.
Sample table : employees
Sample Solution:
Oracle Code:
SELECT first_name, last_name, hire_date
FROM employees
WHERE hire_date IN('01-JUL-2006','24-MAR-2007','04-JAN-2008')
ORDER BY hire_date asc;
Output:
FIRST_NAME LAST_NAME HIRE_DATE -------------------- ------------------------- --------- Samuel McCain 01-JUL-06 Elizabeth Bates 24-MAR-07 Charles Johnson 04-JAN-08
Pictorial Presentation:
Improve this sample solution and post your code through Disqus.
Previous: Write a query to list the name (first and last name), hire date of all the employees who joined before or after 2005.
Next: Write a query to concatenate first name, last name and job id from employees table in the following format.
What is the difficulty level of this exercise?
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework