Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MySQL Function to Add White Spaces Between Two Strings



MySQL SPACE() function is used to add white spaces between two strings. The argument passed in SPACE() function is an integer which specifies how many white spaces we want to add.

Syntax

SPACE(N)

Here, N is an integer specifies the number of white spaces we want to add.

Example

mysql> Select 'My Name is', Space(5), 'Ram';
+------------+----------+-----+
| My Name is | Space(5) | Ram |
+------------+----------+-----+
| My Name is |          | Ram |
+------------+----------+-----+
1 row in set (0.00 sec)

In the example above, SPACE() function adds 5 white spaces between the strings.

Updated on: 2020-02-10T06:25:50+05:30

220 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements