SPACE() FUNCTION in MySQL

SPACE() FUNCTION
The MySQL SPACE function is used to get a string with a specified number of spaces. The various versions of MySQL supports the SPACE function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23.

Syntax:

SPACE( number )

Parameters:
number: It is used to specify the number of space to return.

Example:

mysql> SELECT SPACE ( 5 );

Output:

‘     ’

Explanation:
The string with 5 space characters is returned.

Please Share