Table of Contents
SPACE Function in SQL Server is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.
The article will explore and show you how to use the SPACE function to create a full-space string in SQL Server.
Describe
The SPACE function in SQL Server helps return a string with the number of spaces specified in the statement.
Syntax
To use SPACE in SQL Server, we use the following syntax:
SPACE(so_luong)
Parameters :
- so_luong: a positive integer that specifies the number of spaces. If so_luong is negative, the function returns NULL.
Note :
- SPACE can be used in later versions of SQL Server: SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005.
For instance,
Next lesson: STR function in SQL Server
FAQ
What should you know about describe?
The SPACE function in SQL Server helps return a string with the number of spaces specified in the statement.
What should you know about syntax?
To use SPACE in SQL Server, we use the following syntax:
What should you know about for instance,?
Next lesson: STR function in SQL Server.
Reader Comments 0
Sign in with email or Google to join the discussion.