Oracle: List the names of the employees whose first name has only five characters and starting with 'S' and ending with 'n'
Oracle Wildcard special Operator: Exercise-7 with Solution
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'.
Sample table : employees
Sample Solution:
Oracle Code:
SELECT first_name, last_name
FROM employees
WHERE length(first_name) = 5 and first_name like ’S%n’;
Output:
FIRST_NAME LAST_NAME -------------------- ------------------------- Susan Mavris
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 first name has only five characters and last name have third alphabet ends with 's'.
Next: 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'.
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