Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Returns a string of repeated spaces.

SPACE ( 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.


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

SELECT [Last Name] + ',' + SPACE(5) + [First Name]
FROM Employees
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft