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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 10:27:27  来源:igfitidea点击:

How to insert & in oracle using toad?

sqloracletoad

提问by Rose

Possible Duplicate:
select * from table_name where column like '&nbsp'

可能重复:
select * from table_name where column like ' '

How do you insert the & symbolas 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 &Somethingwon'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 OFFwill stop sqlplus interpreting & this way.

SET DEFINE OFF将停止 sqlplus 解释 & 这样。

this will also work

这也行

set define off;
insert into tablename values( 'AT & T');