Mysql TRIM()函数用于从字符串中删除特定的后缀、前缀或两者。TRIM()函数的工作原理可以通过其语法来理解 −语法TRIM([{BOTH | LEADING | TRaiLING} [str_to_remo
Mysql TRIM()函数用于从字符串中删除特定的后缀、前缀或两者。TRIM()函数的工作原理可以通过其语法来理解 −
TRIM([{BOTH | LEADING | TRaiLING} [str_to_remove] FROM] string)
这里,
在这里,
mysql> Select TRIM(BOTH '0' FROM '0100');
+----------------------------+
| TRIM(BOTH '0' FROM '0100') |
+----------------------------+
| 1 |
+----------------------------+
1 row in set (0.00 sec)
mysql> Select TRIM(BOTH '**' from '**tutorialspoint.com**');
+------------------------------------------------+
| TRIM(BOTH '**' from '**tutorialspoint.com**') |
+------------------------------------------------+
| tutorialspoint.com |
+------------------------------------------------+
1 row in set (0.00 sec)
mysql> Select TRIM(Trailing '**' from '**tutorialspoint.com**');
+----------------------------------------------------+
| TRIM(Trailing '**' from '**tutorialspoint.com**') |
+----------------------------------------------------+
| **tutorialspoint.com |
+----------------------------------------------------+
1 row in set (0.00 sec)
mysql> Select TRIM(Leading '**' from '**tutorialspoint.com**');
+---------------------------------------------------+
| TRIM(Leading '**' from '**tutorialspoint.com**') |
+---------------------------------------------------+
| tutorialspoint.com** |
+---------------------------------------------------+
1 row in set (0.00 sec)
--结束END--
本文标题: MySQL TRIM() 函数的用途是什么?
本文链接: https://www.lsjlt.com/news/437226.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0