---
title: "mysql字符串替换"
author: "xwpxcom"
date: "2012-07-25T16:26:48Z"
tags: ["mysql 字符串替换"]
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2012-07-25T16:26:48Z"
id: 1606622
url: "https://xwpxcom.iteye.com/blog/1606622"
---

update table set field =  
replace(  
    field ,  
    substring(  
        field ,  
        locate(concat('&lt;A ',''), field ),  
        locate(concat('target=\_blank&gt;',''),field )+14-locate(concat('&lt;A',''), field )  
        ),  
    ''  
    );