日期:2014-05-16 浏览次数:20431 次
update tbl_name set field_name=if(field_name REGEXP '/$', substr(field_name,1,length(field_name)-1),field_name)
update tbl_name set field_name=if(field_name RLIKE '/', substr(field_name,1,length(field_name)-1),field_name)
update tbl_name set field_name=substr(field_name,1,length(field_name)-1) where field_name REGEXP '/$'
update tbl_name set field_name=substr(field_name,1,length(field_name)-1) where field_name RLIKE '/''
update tbl_name set field_name=left(field_name,length(field_name)-1) where field_name REGEXP '/$'
update tbl_name set field_name=left(field_name,length(field_name)-1) where field_name RLIKE '/''