bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL TRIM() Function

Example

SELECT TRIM('    SQL Tutorial    ') AS TrimmedString;

Definition and Usage

The TRIM() function removes leading and trailing spaces from a string.

Syntax

TRIM(
string
)

Parameter Values

ParameterDescription
stringRequired. The string to remove leading and trailing spaces from

Technical Details

Works in:From MySQL 4.0

Previous

MySQL SUBSTRING_INDEX() Function

Next

MySQL UCASE() Function