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;