SQL replace replacement character Function

Source: Internet
Author: User

This article introduces a very practical function replace in SQL. This function can replace the character you specified. The following describes how to use the update statement.


Mysql replace string function can replace some strings of a field with other strings, for example

The Code is as follows: Copy code

Update dede_addonarticle set body = replace (body, 'news/uploads/allimg/c110826', 'news/uploads/blank.gif? ')

You can replace all the image links in the dedecms article content table with blank images, so that you can delete a large number of uploaded images to save space.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.