In this post explains how to use the SPACE function in SQL Server (Transact-SQL) with syntax and examples.
In SQL Server (Transact-SQL), the SPACE function returns a string with a specified number of spaces.
The syntax for the SPACE function in SQL Server (Transact-SQL) is:
The number of spaces to be returned.
The SPACE function can be used in the following versions of SQL Server (Transact-SQL):
Let's look at some SQL Server SPACE function examples and explore how to use the SPACE function in SQL Server (Transact-SQL).
For example: