bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL LTRIM() Function

Concept visual

MySQL LTRIM() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Remove leading spaces from a string:

SELECT LTRIM("     SQL Tutorial") AS LeftTrimmedString;

Definition and Usage

The LTRIM() function removes leading spaces from a string.

Syntax

Ltrim(

string )

Parameter Values

Parameter

Description string

Required. The string to remove leading spaces from

Technical Details

Works in:

From MySQL 4.0

Previous

❮ MySQL Functions

Next

Previous

MySQL LPAD() Function

Next

MySQL MID() Function