如何在TOAD中逃脱&符? [英] How to escape ampersand in TOAD?

查看:116
本文介绍了如何在TOAD中逃脱&符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试插入带有'&'的值时在TOAD中,我提示输入替换变量.

When I try to insert a value which has '&' in TOAD I get a prompt for a substitution variable.

所以当我尝试:

insert into x values('hello & world'); 

它提示替换变量'world'.

it throws a prompt for substituting the variable 'world'.

我尝试在编辑器中右键单击并禁用替换变量的提示,但这似乎仅适用于Execute语句( F9 ),不适用于Execute as script( F5 ).

I have tried right clicking in the editor and disabling prompt for substitution variables but this seems to work only for Execute Statement (F9) It doesn't work for Execute as script(F5).

我也知道像使用chr(38)一样

insert into x values('hello '||chr(38)||'world');

但是我不想要这个. 还有其他可以帮助我运行脚本的东西吗?

but I do not want this. Is there something else that will help me run the script?

推荐答案

尝试将set define off放在脚本的开头.它应该与 F5 一起使用:

Try putting set define off at the beginning of your script. It should work with F5:

set define off;
insert into x values('hello & world'); 
set define on;

这篇关于如何在TOAD中逃脱&符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆