MySQL SPACE() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL SPACE() Function

❮ MySQL Functions

Example

Return a string with 10 spaces:

SELECT SPACE(10);
Try it Yourself »

Definition and Usage

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

Syntax

SPACE(number)

Parameter Values

Parameter Description
number Required. The number of spaces to return

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

❮ MySQL Functions