SQL SPACE is a string function that replicates the number blanks that you want add to the given string.
SYNTAX
SPACE(number)
number is an integer value.
Lets look at an example of SQL SPACE Function.
The following example concatenates, two string ‘Micorsoft Sql server’ , 15 spaces and ‘2017’
SELECT 'Microsoft SQL SERVER'+SPACE(15)+'2017' as Output
Lets try to do same example without using SPACE function.
SELECT 'Microsoft SQL SERVER'+ ' ' +'2017' as Output
Also Read..
1,038 total views, 1 views today