MySQL table column names can be used with the SPACE() function to add spaces between two columns, after or before a specified column. The following uses the data of the "Student" table as an example for demonstration.
mysql> Select Id, Space(8),Name from Student; +------+----------+---------+ | Id | Space(8) | Name | +------+----------+---------+ | 1 | | Gaurav | | 2 | | Aarav | | 15 | | Harshit | | 20 | | Gaurav | | 21 | | Yashraj | +------+----------+---------+ 5 rows in set (0.00 sec)
In the above example, 8 spaces are added between two columns as one column.
The above is the detailed content of How to use the SPACE() function with MySQL column data?. For more information, please follow other related articles on the PHP Chinese website!