Learn SQL Server from the Best Tutors
Search in
In SQL Server, the SPACE()
function is used to generate a string consisting of a specified number of space characters. It takes an integer argument that represents the number of spaces to include in the resulting string.
The syntax of the SPACE()
function is as follows:
SPACE ( integer_expression )
Here, integer_expression
is the number of spaces to generate. It can be any valid integer expression.
Here's an example of how to use the SPACE()
function:
-- Generate a string with 5 spaces SELECT SPACE(5) AS Spaces;
The result of this query would be a string containing five space characters.
The SPACE()
function is often used in combination with other string functions to format output or align text within a result set. For example, it can be used to create padding between columns when displaying data.
Related Questions
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Why Should you Learn Microsoft Office
Microsoft Office is a very popular tool amongst students and C-Suite. Today, approximately 1.2 billion people across 140 countries use the office programme. It is used at home, schools and offices on a daily basis for organizing, handling and presenting data and information. Microsoft Office Suite offers programs that can...
8 Hottest IT Careers of 2014!
Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...
What is Applications Engineering all about?
Applications engineering is a hot trend in the current IT market. An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...
Make a Career as a BPO Professional
Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...
Looking for SQL Server Training?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for SQL Server Classes are on UrbanPro
The best Tutors for SQL Server Classes are on UrbanPro