Home  >  Article  >  Database  >  How to use the SPACE() function with the MySQL WHERE clause?

How to use the SPACE() function with the MySQL WHERE clause?

WBOY
WBOYforward
2023-08-29 09:05:08866browse

如何将 SPACE() 函数与 MySQL WHERE 子句一起使用?

In this case, the SPACE() function will add spaces based on the conditions given in the WHERE clause. The following example from the Students table demonstrates this.

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)

The above is the detailed content of How to use the SPACE() function with the MySQL WHERE clause?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete