space

Description

Returns a string consisting of the specified number of single-byte spaces.

Syntax

space(integer_expr)

Parameters

integer_expr

is any integer (tinyint, smallint, or int) column name, variable, or constant expression.

Examples

Example 1

select "aaa", space(4), "bbb"
--- ---- --- 
aaa      bbb

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute space.

See also

Functions isnull, rtrim