Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

TRIM

Example

Eliminate spaces at the beginning and end of a string.

SELECT TRIM(‘    SQL Tutorial    ‘) AS TrimmedString;  

Definition and Usage

he TRIM() function eliminates spaces at both the beginning and end of a string.

Syntax

TRIM(string)

Parameter Values

Parameter

Description

string

Mandatory. Specifies the string from which leading and trailing spaces should be removed.

Technical Details

Works in: From MySQL 4.0