SPACE
The SPACE function returns a string of as many spaces as the integer specifies.
Syntax
SPACE (integer)
Remarks
| • | This function accepts a DECIMAL input value. |
| • | If the input is NULL, the output is also NULL; otherwise, the output is a string. |
| • | If the input is a negative integer, the output is NULL. |
The following table lists the input types that you can use in SPACE, and their corresponding output types.
|
Data Type of integer |
Output Type |
|
BIGINT, DECIMAL, INTEGER, SMALLINT, TINYINT |
CHAR |
|
NULL |
NULL |
Example
SELECT CONCAT (customers.ContactFirstName,
CONCAT (SPACE (1), customers.ContactLastName)) Name
FROM /shared/examples/ds_orders/customers customers