SQL
String Functions
Manipulate text data with SQL string functions.
By TechCoder TeamLast updated: 2026-06-02
In a Nutshell
Manipulate text data with SQL string functions. This hands-on tutorial focuses on practical implementation of string functions concepts.
Common String Functions
SQL provides many built-in functions to work with strings.
| Function | Description |
|---|---|
LENGTH(str) | Returns the length of a string. |
UPPER(str) | Converts string to uppercase. |
LOWER(str) | Converts string to lowercase. |
SUBSTR(str, start, len) | Extracts a substring. |
(Note: Syntax may vary slightly between databases like MySQL vs SQLite. We use standard SQLite functions here).
Example: Uppercase and Length
Example: Concatenation
In SQLite/PostgreSQL, use ||. In MySQL, use CONCAT(). Since this playground is SQLite-based, we use ||.