Share via


Ltrım DEYIMINI (Transact-sql)

Baştaki boşlukları kaldırır sonra karakter ifade verir.

Konu bağlantısı simgesi Transact-SQL Sözdizim Kuralları

Sözdizimi

LTRIM ( character_expression )

Bağımsız değişkenler

  • character_expression
    Olan bir ifade karakter veya ikili veri. character_expressionbir sabit, değişken veya sütun olabilir. character_expressiondışında bir veri türünde olmalıdır text, ntext, ve image, yani örtük olarak dönüştürülebilir için varchar. Aksi durumda, döküm açıkça dönüştürmek için character_expression.

Dönüş Türü

varchar veya nvarchar

Örnekler

Aşağıdaki örnek LTRIMbaştaki boşluk karakteri değişken kaldırmak için.

DECLARE @string_to_trim varchar(60);
SET @string_to_trim = '     Five spaces are at the beginning of this
   string.';
SELECT 'Here is the string without the leading spaces: ' + 
   LTRIM(@string_to_trim);
GO

DECLARE @string_to_trim varchar(60);
SET @string_to_trim = '     Five spaces are at the beginning of this
   string.';
SELECT 'Here is the string without the leading spaces: ' + 
   LTRIM(@string_to_trim);
GO

Sonuç kümesi buradadır.

------------------------------------------------------------------------
Here is the string without the leading spaces: Five spaces are at the beginning of this string.             

(1 row(s) affected)

------------------------------------------------------------------------
Here is the string without the leading spaces: Five spaces are at the beginning of this string.             

(1 row(s) affected)

Ayrıca bkz.

Başvuru

Veri Türleri (Transact-SQL)

Dize işlevler (Transact-sql)