SQL replace的使用

需要修改表myTable表的myField字段的前缀,前缀都是"furong......."

前缀:
update myTable set myField = replace(myField,'furong','lotus') where myField like 'furong%'

同理:
中间:
update myTable set myField = replace(myField,'furong','lotus') where myField like '%[furong]%'

后缀:
update myTable set myField = replace(myField,'furong','lotus') where myField like '%furong'

 

你可能感兴趣的:(sql,Lotus)