[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
博客介绍了在SQL*PLUS中插入含有'&'字符串的方法。一是使用'set define off'命令;二是推荐的方法,通过示例展示了如何利用字符串拼接插入含'&'的字符串,如'insert into demo values ('scott&'||'tiger')'。
8652

被折叠的 条评论
为什么被折叠?



