Search This Blog

Wednesday, December 18, 2013

LTRIM SQL Server Example

SQL Server > Built-in Functions  LTRIM

LTRIM returns a sting after removes leading blanks.






Example:

DECLARE @str varchar(60);
SET @str = '     six spaces before';
SELECT @str;
SELECT LTRIM(@str);

results:

     six spaces before
six spaces before