SELECT with String Functions
Return employee first and last names in uppercase format.
- String functions
Exercise brief
Understand the request
Data cleanup analyst A directory export needs employee names standardized in uppercase.
Return two columns — first_name_upper and last_name_upper — that are the uppercase versions of first_name and last_name for every employee.
Return
- Return first_name_upper and last_name_upper.
Constraints
- Use string functions to uppercase both name fields.
Data you will use
Review the relevant tables before deciding how to join, filter, or aggregate them.
employees
first_nameVARCHAR(50)last_nameVARCHAR(50)
Hints, when you need them
Open one clue at a time so you still do the reasoning.
Hint 1
UPPER(<text>) returns the uppercase form of a text value. LOWER() does the opposite.
Hint 2
Wrap each column in UPPER() and give it its own alias so the result has two distinct columns.
Hint 3
Apply UPPER to each name independently and give each expression the requested output label.
Verified SQL answer
Attempt the problem first, then compare structure and reasoning—not just syntax.
Reveal solution and explanation
SELECT UPPER(first_name) AS first_name_upper, UPPER(last_name) AS last_name_upper FROM employees;Why this works
Built-in functions like UPPER(), LOWER(), and LENGTH() can be called inside SELECT. Each call produces one new column, so to get two uppercase columns you need to call UPPER() twice — once per source column.
Expected result
Use this output to verify values, aliases, ordering, and row count.
| first_name_upper | last_name_upper |
|---|---|
| JOHN | SMITH |
| ALICE | JOHNSON |
| BOB | WILSON |
| CAROL | DAVIS |
| DAVID | BROWN |
| EMMA | TAYLOR |
| FRANK | GREEN |
| GRACE | WHITE |
| HENRY | CLARK |
| IVY | MARTINEZ |
Learn the concepts behind this answer
Strengthen your understanding with these targeted learning topics:
Continue practicing
Build the next SQL skill
WHERE Clause & Filtering
Practice SQL WHERE clauses with realistic boundary, NULL, text, date, exclusion, and production-filtering problems.
Basic SQL Functions
Practice production-oriented string cleanup, numeric transformations, NULL handling, tolerant conversion, and delimiter parsing.
ORDER BY & Sorting
Practice deterministic SQL ordering with tie-breakers, custom priorities, NULL placement, expressions, joined data, aggregates, and portable top-N patterns.
Open the interactive workspace and practice across SQL topics.