首页 > Linux操作系统 > Linux操作系统 > insert不成功提示输入值
做数据脚本整理时,发现insert居然没执行成功,提示要输入某某变量的值。后来看了一下数据,发现了问题。
create table test(url varchar2(100));
insert into test values('http://10.66.3.104:7001/sree/Examples?op=Replet&outtype=REPORT&name=');
提示输入outtype的值以及name的值。
原来&需要转义的,转义方式如下:
insert into test values('http://10.66.3.104:7001/sree/Examples?op=Replet‘||'&'||'outtype=REPORT'||'&'||'name=’);
或者
insert into test values('http://10.66.3.104:7001/sree/Examples?op=Replet‘||chr(38)||'outtype=REPORT'||chr(38)||'name=’);
就可以了。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12125877/viewspace-683365/ ,如需转载,请注明出处,否则将追究法律责任。