How can I use SPACE() function with MySQL WHERE clause?

MySQLMySQLi Database

In this case, SPACE() function would add white spaces depending upon the condition given in WHERE clause. The following example from student table will demonstrate it.

Example

mysql> Select Id,Name,Space(5) from student WHERE Name='Harshit';
+------+---------+----------+
| Id   | Name    | Space(5) |
+------+---------+----------+
| 15   | Harshit |          |
+------+---------+----------+
1 row in set (0.00 sec)
raja
Published on 20-Feb-2018 16:30:38
Advertisements