SPACE() Function in MySQL Last Updated : 24 Sep, 2020 Comments Improve Suggest changes Like Article Like Report SPACE() function in MySQL is used to return a string consisting of specified empty space characters. Syntax : SPACE(num) Parameter : This method accepts one parameter as mentioned above and described below : num : It is an integer which indicates how many spaces are being contained. Returns : It returns the string containing of specified number spaces . Example-1 : SPACE() Function to return a string containing only spaces. SELECT SPACE(6) AS String_Name; Output : String_Name Example-2 : Applying SPACE() Function with CONCAT() Function return a string. SELECT CONCAT('Geeks', SPACE(3), 'For', SPACE(3), 'Geeks') AS Company_Name; Output : Company_Name Geeks For Geeks Example-3 : Using SPACE() Function in a Table. Table : Player_Details : Player_Id First_Name Last_Name 101 Virat Kohli 102 Rohit Sharma 103 Sikhar Dhawan SELECT CONCAT(First_Name, SPACE(3), Last_Name) AS Full_Name FROM Player_Details ; Output : Full_Name Virat Kohli Rohit Sharma Sikhar Dhawan Comment J jana_sayantan Follow 0 Improve J jana_sayantan Follow 0 Improve Article Tags : SQL DBMS-SQL mysql Explore SQL Tutorial 6 min read BasicsWhat is SQL? 6 min read SQL Data Types 3 min read SQL Operators 4 min read SQL Commands | DDL, DQL, DML, DCL and TCL Commands 4 min read SQL Database Operations 3 min read SQL CREATE TABLE 3 min read Queries & OperationsSQL SELECT Query 2 min read SQL INSERT INTO Statement 4 min read SQL UPDATE Statement 3 min read SQL DELETE Statement 3 min read SQL - WHERE Clause 3 min read SQL | Aliases 3 min read SQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join) 4 min read SQL CROSS JOIN 2 min read SQL | Date Functions 4 min read SQL | String functions 6 min read Data Constraints & Aggregate FunctionsSQL NOT NULL Constraint 2 min read SQL PRIMARY KEY Constraint 5 min read SQL Count() Function 7 min read SQL SUM() Function 5 min read SQL MAX() Function 4 min read AVG() Function in SQL 4 min read Advanced SQL TopicsSQL Subquery 4 min read Window Functions in SQL 6 min read SQL Stored Procedures 7 min read SQL Triggers 5 min read SQL Performance Tuning 6 min read SQL TRANSACTIONS 6 min read Database Design & SecurityIntroduction of ER Model 10 min read Introduction to Database Normalization 6 min read SQL Injection 11 min read SQL Data Encryption 5 min read SQL Backup 4 min read What is Object-Relational Mapping (ORM) in DBMS? 7 min read Like