TRIM

Description

Returns a character expression without blank spaces (TRIM in Transact-SQL).

Sample Source Pattern

Syntax

TRIM( string_expression )

Arguments

string_expression: String expressions to convert.

Return Type

VARCHAR or NVARCHAR

Examples

Code:

IN -> SqlServer_01.sql
SELECT TRIM('  FIRST AND LAST TWO BLANK SPACES  ') AS [TRIM];

Output:

+-------------------------------+
|TRIM                           |
+-------------------------------+
|FIRST AND LAST TWO BLANK SPACES|
+-------------------------------+

Last updated