TechNet
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize
The document is archived and information here might be outdated

SPACE (SQL Server Compact Edition)

Returns a string of repeated spaces.


SPACE ( integer_expression )

integer_expression

A positive integer, or an expression that can be implicitly converted to int, that indicates the number of spaces. If integer_expression is negative or greater than 255, a null string is returned.

nvarchar

The following example concatenates the last name, a comma, two spaces, and then the first name of each employee in the Employees table.

SELECT LastName + ',' + SPACE(2) + FirstName
FROM Employees
Show:
© 2016 Microsoft