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

The usage of trim () function

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

Share

Shulou(Shulou.com)06/01 Report--

In oracle, the use of the trim () function is the beginning of leading, the end of trailing, the beginning and end of both, as follows:

Trim (leading | | trailing | | both 'character to be replaced "from" string to be replaced ")

1. The trim function removes the specified opening character.

Select trim (leading 'x' from 'xday') as strTemp from tableName

2. The trim function removes the specified ending character.

Select trim (trailing 'x' from 'dayx') as strTemp from tableName

3. The trim function removes the specified leading and trailing characters

Select trim (both 'x' from 'xdayx') as strTemp from tableName

4. By default, the trim function removes the characters specified by the header and trailer.

Select trim ('x 'from' xdayx') as strTemp from tableName

5. If no character is specified to be removed, the leading and trailing spaces will be removed by default

Select trim ('day') as strTemp from tableName

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

Database

Wechat

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

12
Report