Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

SQL LTRIM Function

LTRIM removes leading spaces from an input string.

To remove trailing spaces use the RTRIM function.

To remove both leading and trailing spaces use the TRIM function.

Example

#

This example removes the leading spaces from the input string.

SELECT LTRIM('     SQL') AS 'Left Trimmed'
Result:  1 record
Left Trimmed
SQL

Syntax

Syntax of the LTRIM function.

LTRIM(string)

string -- a character expression, variable, or column name.


You may also like



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.