SQL Server Transact Basic to Expert - Repeating Spaces N number of timesKarthikeyan Anbarasan15yPublished Jun 15, 2011, 12:00 AMUpdated Jun 15, 2011, 9:03 AM3.7k00Reactions×25BlogThis blog shows how to repeat an empty space N number of times using SPACE function in SQLExample:SELECT 'This is a sample'+ SPACE(5) + 'String'The expected result would be "This is a sample String"CommentsJoin the conversation! Your thoughts help the community grow.Sign in to leave a commentIt is the same account you read, post and publish with — and you will come straight back to this page.Sign inCreate an account
Join the conversation! Your thoughts help the community grow.