w3resource

Oracle: Query to list first_name, last_name of employees with the pattern 'l_x' in their first name

Oracle Wildcard special Operator: Exercise-11 with Solution

Write a query to list first_name, last_name of employees with the pattern 'l_x' in their first name.

Sample table : employees


Sample Solution:

Oracle Code:

SELECT first_name, last_name
    FROM employees
    WHERE first_name LIKE '%l_x%' 
    ORDER BY first_name;

Output:


FIRST_NAME           LAST_NAME
-------------------- -------------------------
Alexander            Hunold
Alexander            Khoo
Alexis               Bull

Pictorial Presentation:

Pictorial: Query to list first_name, last_name of employees with the pattern 'l_x' in their first name

Improve this sample solution and post your code through Disqus.

Previous: Write a query to list the names (first and last), salary of those employees whose names having a character set ’ll’ together.

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-11.php