Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the TRIM () function in MySQL

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to use the TRIM () function in MySQL", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the TRIM () function in MySQL" this article.

TRIM ()

The TRIM ([remstr FROM] str) function is used to return substrings after deleting all remstr strings on both sides of the string str. Remstr defaults to spaces. For example:

SELECT TRIM ('MySQL string function') AS str1, TRIM ('- 'FROM'-MySQL string function--') AS str2;str1 | str2 |-+-+ MySQL string function | MySQL string function |

The TRIM ([{BOTH | LEADING | TRAILING} [remstr] FROM] str) function is used to return substrings after deleting all remstr strings on both sides / left / right of the string str. The string on both sides (BOTH) is deleted by default, and remstr is a space by default. For example:

SELECT TRIM (LEADING 'FROM' MySQL string function') AS str1, TRIM (TRAILING'- 'FROM'-- MySQL string function--') AS str2 Str1 | str2 |-+-+ MySQL string function |-- MySQL string function | the above is all the contents of the article "how to use the TRIM () function in MySQL". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report