Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPACE

SQL Server 2000

Returns a string of repeated spaces.

Syntax
SPACE ( integer_expression )
Arguments
integer_expression
Is 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.
Return Types

nvarchar

Examples

The following example uses the Employees table in the Northwind database. The example concatenates the last names of the employees, a comma, two spaces and the first names of the employees.

SELECT LastName + ',' + SPACE(2) + FirstName
FROM Employees

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.