mysql 更新某个字段的部分内容
2010-12-20 16:40
337 查看
语法:update table_name t set t.row_name=replace(t.row_name,'old_value','new_value')
注:table_name 表名; row_name 被更新的列名; old_value 要被更新的值; new_value 更新的新值
例如:将content里的www,替换为'http://file.resources.tt.515best.com的语句如下:
update tl_lanb11_content t set
t.content=replace(t.content,'www','http://file.resources.tt.515best.com')
where t.nb_content_id=49976
注:table_name 表名; row_name 被更新的列名; old_value 要被更新的值; new_value 更新的新值
例如:将content里的www,替换为'http://file.resources.tt.515best.com的语句如下:
update tl_lanb11_content t set
t.content=replace(t.content,'www','http://file.resources.tt.515best.com')
where t.nb_content_id=49976
相关文章推荐
- mysql更新字段中部分内容的sql语句写法
- MySQL更新字段中部分内容&shell脚本执行命令
- mysql 修改某字段部分内容
- mysql去掉某个字段的某部分内容
- MySQL数据表字段内容的批量修改、清空、复制等更新命令
- mysql替换字段里数据内容部分字符串(亦可用于增加字段中的内容)
- mysql字段内容部分截取
- Mysql 两种情况下更新字段中部分数据的方法
- Mysql更新字段中部分数据的方法
- mysql替换字段里数据内容部分字符串
- Mysql两种情况下更新字段中部分数据的方法
- mysql 替换字段部分内容
- Mysql更新字段中部分数据的方法
- MySQL update替换字段部分内容
- 数据库更新字段部分内容的语句
- sql语句更新某字段内容中部分数据
- mysql使用REPLACE替换字段里数据内容部分字符串
- mysql 替换语句 替换字段内容(全部或部分)
- 用update和replace在mysql中替换某一个字段的部分内容
- Mysql两种情况下更新字段中部分数据的方法