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 understanding of replace in sql

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

I came into contact with replace in the modification of sql today. I'd like to share it with you.

Replace ('stat1','stat2','stat3')

Example: select replace ('111222333444) from dual

Output as' 111888333444'

Parameters.

Stat1 (string to be changed): the string to be searched. Can be of any length.

Stat2 (replaced string): the string to be searched for and replaced by stat3. The length of the string should not exceed 255 bytes. If stat2 is an empty string, the original string is returned as is.

Stat3 (replacement string): this string is used to replace stat2. Can be of any length. If the stat3 is an empty string, delete all stat2 that appear.

ASCII code corresponding tables chr (9), chr (10), chr (13), chr (32), chr (34), chr (39) http://www.mamicode.com/info-detail-169435.html

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