space
This function is used to return a specified number of spaces.
Syntax
space(bigint <n>)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
n |
Yes |
BIGINT |
Number of spaces |
Return Values
The return value is of the STRING type.
![](https://support.huaweicloud.com/eu/sqlref-spark-dli/public_sys-resources/note_3.0-en-us.png)
- If the value of n is empty, an error is reported.
- If the value of n is NULL, NULL is returned.
Example Code
The value 6 is returned.
select length(space(6));
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.