SPACE returns a string with repeated spaces.
If more than 8000 spaces are needed, use the REPLICATE function.
This example returns a string with 4 repeated spaces.
SELECT 'Order' + SPACE(4) + 'Received' AS 'With Spaces'
| With Spaces |
|---|
| Order Received |
Syntax of the SPACE function.
SPACE(number)
number -- specifies the number of spaces.