Oracle: List the names of those employees whose first name has only five characters
Oracle Wildcard special Operator: Exercise-4 with Solution
Write a query to list the names (first and last) of those employees whose first name has only five characters.
Sample table : employees
Sample Solution:
Oracle Code:
SELECT first_name, last_name
FROM employees
WHERE length(first_name) = 5;
Output:
FIRST_NAME LAST_NAME -------------------- ------------------------- Ellen Abel Mozhe Atkinson David Austin Sarah Bell David Bernstein Laura Bissot Kelly Chung Karen Colmenares Julia Dellinger Bruce Ernst Kevin Feeney Nancy Greenberg Peter Hall Vance Jones Payam Kaufling Neena Kochhar James Landry David Lee Diana Lorentz Jason Mallin James Marlow Susan Mavris Allan McEwen Irene Mikkilineni Kevin Mourgos Julia Nayer Karen Partners Valli Pataballa Hazel Philtanker Sigal Tobias Peter Tucker Peter Vargas Clara Vishney Alana Walsh Eleni Zlotkey 35 rows selected.
Pictorial Presentation:
Improve this sample solution and post your code through Disqus.
Previous: Write a query to list the names (first and last) of those employees whose name have second alphabet 's' in their names.
Next: Write a query to list the names (first and last) of those employees whose first name has only five characters and starts with ‘A’.
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://www.w3resource.com/oracle-exercises/wildcard-special-operators/oracle-wildcard-special-operators-exercise-4.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics