码迷,mamicode.com
首页 > 数据库 > 详细

sql语句把字段中的某个字符去掉

时间:2016-11-14 15:00:00      阅读:343      评论:0      收藏:0      [点我收藏+]

标签:.net   arch   har   open   trait   sql语句   ace   字段   access   

 sql语句把字段中的某个字符去掉

update Notifications set Accessory=replace(Cast(Accessory as varchar(8000)),http://demo.m-school.net,‘‘)

 例如:

update Notifications set Accessory=replace(Cast(Accessory as varchar(8000)),http://192.168.2.180,‘‘)
update Notifications set Accessory=replace(Cast(Accessory as varchar(8000)),http://zpzx.m-school.net,‘‘)
update Homeworks set Accessory=replace(Cast(Accessory as varchar(8000)),http://192.168.2.180,‘‘)
update Homeworks set Accessory=replace(Cast(Accessory as varchar(8000)),http://zpzx.m-school.net,‘‘)
update OpenCourses set Attachment=replace(Cast(Attachment as varchar(8000)),http://192.168.2.180,‘‘)
update OpenCourses set Attachment=replace(Cast(Attachment as varchar(8000)),http://zpzx.m-school.net,‘‘)
update OpenCourses set Audio=replace(Cast(Audio as varchar(8000)),http://192.168.2.180,‘‘)
update OpenCourses set Audio=replace(Cast(Audio as varchar(8000)),http://zpzx.m-school.net,‘‘)
update ListenCourses set Attachment=replace(Cast(Attachment as varchar(8000)),http://192.168.2.180,‘‘)
update ListenCourses set Attachment=replace(Cast(Attachment as varchar(8000)),http://zpzx.m-school.net,‘‘)
update ListenCourses set Audio=replace(Cast(Audio as varchar(8000)),http://192.168.2.180,‘‘)
update ListenCourses set Audio=replace(Cast(Audio as varchar(8000)),http://zpzx.m-school.net,‘‘)

老师,学生,家长头像:

update Sys_User set Portrait=replace(Portrait,http://zpzx.m-school.net,‘‘)
update Students set Portrait=replace(Portrait,http://zpzx.m-school.net,‘‘)
update Parents set Portrait=replace(Portrait,http://zpzx.m-school.net,‘‘)

 

sql语句把字段中的某个字符去掉

标签:.net   arch   har   open   trait   sql语句   ace   字段   access   

原文地址:http://www.cnblogs.com/yechangzhong-826217795/p/6061525.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!