打印本文 打印本文 关闭窗口 关闭窗口
[Tip]如何在SQL*PLUS中插入含有&的字符串?
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1151  更新时间:2009/4/22 23:22:03  文章录入:mintao  责任编辑:mintao

[Tip]如何在SQL*PLUS中插入含有'&'的字符串?

方法一
在SQL*PLUS中用这个命令:
set define off

方法二(推荐)
参见如下的例子:

SQL> truncate table demo;

Table truncated.

SQL> select * from demo;

no rows selected

SQL> desc demo;

 Name                                      Null?    Type
 ----------------------------------------- -------- -----------------
 X                                                  CHAR(20)

SQL> insert into demo values ('scott&'||'tiger');

1 row created.

SQL> select * from demo;

X
--------------------
scott&tiger

 

打印本文 打印本文 关闭窗口 关闭窗口