SQL Server: LTRIM Function

LTRIM function

This SQL Server tutorial explains how to use the LTRIM function in SQL Server (Transact-SQL) with syntax and examples.


In SQL Server (Transact-SQL), the LTRIM function removes all space characters from the left-hand side of a string.


The syntax for the LTRIM function in SQL Server (Transact-SQL) is:

LTRIM( string )

Parameters or Arguments


The string to trim the space characters from the left-hand side.


Applies To

The LTRIM functions can be used in the following versions of SQL Server (Transact-SQL):

  • SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005


Let’s look at some SQL Server LTRIM functions examples and explore how to use the LTRIM functions in SQL Server (Transact-SQL).

For example:

SELECT LTRIM('   adglob.in');
Result: 'adglob.in'

SELECT LTRIM('   adglob.in   ');
Result: 'adglob.in   '

SELECT LTRIM('   adg lob');
Result: 'adg lob'

Leave a Reply