Mariadb Space Function

MariaDB: SPACE Function

This MariaDB tutorial explains how to use the MariaDB SPACE function with syntax and examples.

Description

The MariaDB SPACE function returns a string with a specified number of spaces.

Syntax

The syntax for the SPACE function in MariaDB is:

SPACE( number )

Parameters or Arguments

number

The number of spaces to be returned.

Applies To

The SPACE function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB SPACE function examples and explore how to use the SPACE function in MariaDB.

For example:

SELECT SPACE(2);
Output: '  '

SELECT SPACE(5);
Output: '     '