Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

SQL SPACE Function

SPACE returns a string with repeated spaces.

If more than 8000 spaces are needed, use the REPLICATE function.

Example

#

This example returns a string with 4 repeated spaces.

SELECT 'Order' + SPACE(4) + 'Received' AS 'With Spaces'
Result:  1 record
With Spaces
Order    Received

Syntax

Syntax of the SPACE function.

SPACE(number)

number -- specifies the number of spaces.


You may also like



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.