String Functions
SQL has built-in functions for working with text.
Common string functions:
- UPPER(text) - converts to uppercase
- LOWER(text) - converts to lowercase
- LENGTH(text) - returns character count
- SUBSTR(text, start, length) - extracts part of a string
- TRIM(text) - removes leading/trailing spaces
Concatenation in SQLite uses ||:
Example:
String functions are essential for cleaning and formatting data.
Check your understanding
Create each employee's full name in uppercase, first and last name separated by a space.
Examples run on the employees sample database. Open any of them in the playground to experiment.