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

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)
Updated on: 2020-02-10T06:24:38+05:30

363 Views

Advertisements