sql 查询+替换 (讨论)

问:

某字段内容可能包含字符串:
guan/upload/

如果有就把它替换成:
http://www.cnblogs.com/guan/upload/

答1:

select REPLACE(字段名,'guan/upload/','http://www.cnblogs.com/guan/upload/') as 字段名
from 表名
答2:

updateset [某字段]=replace([某字段],'guan/upload/','http://www.cnblogs.com/guan/upload/')

你可能感兴趣的:(sql)