日期:2014-05-18  浏览次数:20438 次

怎样修改数据库中字符串的值?
数据库中有一个字段Tstr,类型varchar(100),要把对应的数据 "E:/ "改为 "Gany ",用sql怎么实现,谢谢。

------解决方案--------------------
update table set Tstr = replace(Tstr, 'E:/ ', 'Gany ')
------解决方案--------------------
update table set Tstr = 'Gany ' where Tstr = 'E:/ '
------解决方案--------------------
update table set Tstr = 'Gany ' where Tstr = 'E:/ '