w3resource

Oracle: List the names, hire date of those employees who joined in the month of which second character is 'u'

Oracle Wildcard special Operator: Exercise-8 with Solution

Write a query to list the names (first and last), hire date of those employees who joined in the month of which second character is 'u'.

Sample table: employees


Sample Solution:

Oracle Code :

SELECT  first_name, last_name, hire_date  
FROM employees 
WHERE to_char(hire_date, ’MON ’) LIKE ’_U%’; 

Output:

FIRST_NAME           LAST_NAME                 HIRE_DATE
-------------------- ------------------------- ---------
Steven               King                      17-JUN-03
David                Austin                    25-JUN-05
Nancy                Greenberg                 17-AUG-02
Daniel               Faviet                    16-AUG-02
Sigal                Tobias                    24-JUL-05
Karen                Colmenares                10-AUG-07
Matthew              Weiss                     18-JUL-04
Julia                Nayer                     16-JUL-05
Laura                Bissot                    20-AUG-05
Jason                Mallin                    14-JUN-04
Michael              Rogers                    26-AUG-06
Renske               Ladwig                    14-JUL-03
Peter                Vargas                    09-JUL-06
Peter                Hall                      20-AUG-05
Allan                McEwen                    01-AUG-04
Martha               Sullivan                  21-JUN-07
Julia                Dellinger                 24-JUN-06
Kelly                Chung                     14-JUN-05
Jennifer             Dilly                     13-AUG-05
Timothy              Gates                     11-JUL-06
Samuel               McCain                    01-JUL-06
Donald               OConnell                  21-JUN-07
Pat                  Fay                       17-AUG-05
Susan                Mavris                    07-JUN-02
Hermann              Baer                      07-JUN-02
Shelley              Higgins                   07-JUN-02
William              Gietz                     07-JUN-02

27 rows selected.

Pictorial Presentation:

Pictorial: List the names, hire date of those employees who joined in the month of which second character is 'u'

Improve this sample solution and post your code through Disqus.

Previous: Write a query to list the names (first and last) of the employees whose first name has only five characters and starting with 'S' and ending with 'n'.
Next: Write a query to list the names (first and last), salary of those employees whose salary is four digit number ending with Zero.

What is the difficulty level of this exercise?



Become a Patron!

Follow us on Facebook and Twitter for latest update.

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://www.w3resource.com/oracle-exercises/wildcard-special-operators/oracle-wildcard-special-operators-exercise-8.php