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

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

WBOY
Release: 2016-06-01 13:12:06
Original
1063 people have browsed it

问题重现:

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

解决办法

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

 

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template