SQL 如何使用toad在oracle中插入&?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5921274/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to insert & in oracle using toad?
提问by Rose
Possible Duplicate:
select * from table_name where column like ' '
How do you insert the & symbol
as data in an Oracle database, using Toad? Example:
如何& symbol
使用 Toad 在 Oracle 数据库中插入as 数据?例子:
INSERT INTO <table_name>
(column)
VALUES
('AT & T');
When executing script asking new value for T...
当执行脚本询问 T 的新值时...
回答by Pablo Santa Cruz
Use this:
用这个:
insert into my_table values ('AT &' || 'T');
You can also try using:
您也可以尝试使用:
set define off;
In your environment so &Something
won't be treated as if it is an input variable. But I don't know where to put that in TOAD.
在您的环境中,因此&Something
不会将其视为输入变量。但我不知道把它放在 TOAD 的什么地方。
回答by mr_eclair
SET DEFINE OFF
will stop sqlplus interpreting & this way.
SET DEFINE OFF
将停止 sqlplus 解释 & 这样。
this will also work
这也行
set define off;
insert into tablename values( 'AT & T');