doc-exports/docs/dli/sqlreference/dli_spark_space.html
Su, Xiaomeng 76a5b1ee83 dli_sqlreference_20240227
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-03-27 22:02:33 +00:00

4.2 KiB

space

This function is used to return a specified number of spaces.

Syntax

space(bigint <n>)

Parameters

Table 1 Parameter

Parameter

Mandatory

Type

Description

n

Yes

BIGINT

Number of spaces

Return Values

The return value is of the STRING type.

  • 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));