Home  >  Article  >  Database  >  MySql同一个列中的内容进行批量修改_MySQL

MySql同一个列中的内容进行批量修改_MySQL

WBOY
WBOYOriginal
2016-06-01 13:12:061036browse

问题重现:

MySql 数据库中,一给列的内容中包括 “.wmv” 需要将 “.” 后的wmv格式 换为“flv”

解决办法

update  video_info   set  file_path=substring(file_path,1,length(file_path)-3);
先执行以上SQL进行删除;
update  video_info set file_path = concat(file_path,'flv');
再执行这条语句把flv添加到后面。

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn