LTRIM function in SQL Server
LTRIM function in SQL Server is used to delete all space characters from the first position (left positions) of the string.
The article will learn and show you how to use the LTRIM function in SQL Server to delete all space characters from the left-hand positions of the string.
Describe
LTRIM function in SQL Server is used to delete all space characters from the first position (left positions) of the string.
Syntax
To use the LTRIM function in SQL Server, we use the following syntax:
LTRIM(chuoi)
Parameters :
- string : the string you want to cut space characters from the left side. This string must be a character expression or binary data. It can be a string, variable or column.
Note :
- See also RTRIM function with the same function but on the right side.
- LTRIM function can be used in later versions of SQL Server: SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005.
For example
Take a look and explore some examples of LTRIM functions in SQL Server.
SELECT LTRIM(' TipsMake.com');
Result: 'TipsMake.com'
SELECT LTRIM(' TipsMake.com ');
Result: 'TipsMake.com '
SELECT LTRIM(' Quan Tri Mang');
Result: 'Quan Tri Mang'
Previous article: LOWER function in SQL Server
Next lesson: REPLACE function in SQL Server
Update 25 May 2019
You should read it
- DAY function in SQL Server
- MIN function in SQL Server
- MAX function in SQL Server
- ABS function in SQL Server
- SUM function in SQL Server
- RIGHT function in SQL Server
- AVG function in SQL Server
- ROUND function in SQL Server
- DATEPART function in SQL Server
- MONTH function in SQL Server
- FUNCTION (Function) in SQL Server
- DATEDIFF function in SQL Server
Maybe you are interested
We may be able to see the 'second moon' in the sky with the naked eye next May Instructions for creating animation-based shark models The most bizarre things people ever bring to space Will the Earth be affected if the comet once destroyed the dinosaurs hitting the Sun? 'Wow!' - Has the mysterious cosmic signal of 'alien' been decoded? Simulation equipment shows that the face of the Earth has a new continent after another 250 million years