在尝试使用Oracle SQL Developer执行SQL insert语句时,我一直在生成"Enter substitution value“提示:
insert into agregadores_agregadores
(
idagregador,
nombre,
url
)
values
(
2,
'Netvibes',
'http://www.netvibes.com/subscribe.php?type=rss\&url='
);
我已经使用上面的'\‘尝试了escaping the special character in the query,但是我仍然无法避免'&',这会导致字符串替换。
发布于 2009-07-20 13:33:47
&
是DEFINE
的默认值,它允许您使用替代变量。我喜欢使用以下命令来关闭它
SET DEFINE OFF
这样你就不必担心转义或CHR(38)。
发布于 2010-04-27 14:53:14
|| chr(38) ||
这个解决方案非常完美。
发布于 2009-07-16 12:53:11
insert into AGREGADORES_AGREGADORES (IDAGREGADOR,NOMBRE,URL)
values (2,'Netvibes',
'http://www.netvibes.com/subscribe.php?type=rss' || chr(38) || 'amp;url=');
https://stackoverflow.com/questions/1137354
复制相似问题