Questions about mysql batch replacement

Source: Internet
Author: User
About mysql batch replacement problem table name: sdb_daq_comment field is: contentcontent contains some & lt; a & gt; tags. How do I write SQL statements that replace mysql & lt; a & gt; tags in batches ?, Updatesdb_daq_commentsetcontent = replace (content, '& Questions about mysql batch replacement
Table name: sdb_daq_comment
The field is: content
Content contains some tags.
How to write SQL statements that replace mysql labels in batches?

------ Solution --------------------
Update sdb_daq_comment set content = replace (content ,'','');
------ Solution --------------------
Discussion

Reference:

Try ~
SQL code

Update sdb_daq_comment set content = REPLACE (content, '','') where 1 = 1;


No. Yes, but the content in the tag is a hyperlink, which is an uncertain value. How to remove them together

------ Solution --------------------
Try again ~
SQL code
Update sdb_daq_comment set content = REPLACE (content, substring (content, locate ('', content), locate ('', content), '') where 1 = 1;

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.