含有‘&’的字符串在oracle无法插入和更新

今天qq技术群里有人提了一个问题:
update t_shop set s_map_address="http://searchbox.mapbar.com/publish/template/template1010/index.jsp?CID=jimsang&tid=tid1010&nid=MAPBZISEJECICISRSECAX&width=225&height=192&infopoi=1"
语句没办法执行,在网上搜了一下原来是‘&’惹的祸,他在oracle中是个转义字符,所以需要把他替换成chr(38)就行了。或者直接用‘&&’代替‘&’,这是我的测试语句:
update user_advice_record_info w set w.disposeresult='http://searchbox.mapbar.com/publish/template/template1010/index.jsp?CID=jimsang'||chr(38)||'tid=tid1010'||chr(38)||'nid=MAPBZISEJECICISRSECAX'||chr(38)||'width=225'||chr(38)||'height=192'||chr(38)||'infopoi=1'

update user_advice_record_info w set w.disposeresult='http://searchbox.mapbar.com/publish/template/template1010/index.jsp?CID=jimsang&&tid=tid1010&&nid=MAPBZISEJECICISRSECAX&&width=225&&height=192&&infopoi=1'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值