MySQL String Exercises: Find all employees where first names are in upper case
MySQL String: Exercise-8 with Solution
Write a query to find all employees where first names are in upper case.
Sample table: employees
Code:
SELECT * FROM employees
WHERE first_name = BINARY UPPER(first_name);
Sample Output:
EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL PHONE_NUMBER HIRE_DATE JOB_ID SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID 132 TJ Olson TJOLSON 650.124.8234 1987-07-19T04:00:00.000Z ST_CLERK 2100 0 121 50
MySQL Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous:Write a query to get the employee id, email id (discard the last three characters).
Next:Write a query to extract the last 4 character of phone numbers.
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