APPX Software Library

Chapter 4: SQL Language Elements

4.9.2.76 SPACE function (ODBC compatible)

Syntax

SPACE ( count )

Description

The scalar function SPACE returns a character string consisting of count spaces.

Example

SELECT CONCAT(SPACE(3), name)
FROM customer
WHERE name = 'Roberts';

CONCAT (   ,NAME)

   Roberts
1 record selected

Notes

  • The count argument can be of type INTEGER, SMALLINT, BIGINT, or TINYINT.
  • If count is null, the result is null.
  • If count is negative, the result is null.