mysql 去除字符串中的空格

 

mysql> select "  ddd dddee ";
+--------------+
| ddd dddee    |
+--------------+
|   ddd dddee  |
+--------------+
1 row in set (0.00 sec)


mysql> select rtrim("  ddd dddee ");
+-----------------------+
| rtrim("  ddd dddee ") |
+-----------------------+
|   ddd dddee           |
+-----------------------+
1 row in set (0.00 sec)


mysql> select ltrim("  ddd dddee ");
+-----------------------+
| ltrim("  ddd dddee ") |
+-----------------------+
| ddd dddee             |
+-----------------------+
1 row in set (0.00 sec)


mysql> select trim("  ddd dddee ");
+----------------------+
| trim("  ddd dddee ") |
+----------------------+
| ddd dddee            |
+----------------------+
1 row in set (0.00 sec)

 

 

 

posted @ 2019-08-06 01:33  anobscureretreat  阅读(5836)  评论(0编辑  收藏  举报