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

LTRIM

Example

Remove leading spaces from the string.

SELECT LTRIM(‘     SQL Tutorial’AS LeftTrimmedString;

Definition and Usage

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

Note: Also see the RTRIM() function.

Syntax

LTRIM(string)

Parameter Values

Parameter

Description

string

Required: The string from which to remove leading spaces.

Technical Details

Works in:

 SQL Server (from 2008 onward), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse