Summary - String functions
- SQL course
- Beginner
- Lesson 41/115
- 5 min
Combine UPPER, SUBSTRING and CONCAT to format names.
Summary - String functions
In this group you learned UPPER, LOWER, LENGTH, SUBSTRING, TRIM and CONCAT. Combine them to produce clean reports.
SELECT UPPER(TRIM(name)) AS temiz_up FROM customers;This query trims the name first then converts to uppercase.
UPPER(TRIM(name)) AS temiz_up is selected from customers.
Practice Summary - String functions
Trim and uppercase name from customers.
Starter code
-- trim and uppercase
SELECT
FROM customersSample solution
SELECT UPPER(TRIM(name)) AS temiz_up
FROM customersExpected output
temiz_up AYŞE ALEX
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Which runs first in nested functions?
- At the same time
- The outer one
- Random
- The inner one Correct answer
Explanation: The inner function runs first.
2 Summary - String functions: match the terms
| Term | Meaning |
|---|---|
UPPER |
uppercase |
LOWER |
lowercase |
LENGTH |
length |
CONCAT |
join |