ITPub博客

首页 > 数据库 > Oracle > [20230323]sqlplus #.txt

[20230323]sqlplus #.txt

原创 Oracle 作者:lfree 时间:2023-03-27 21:05:23 0 删除 编辑

[20230323]sqlplus #.txt

--//缺省如果sqlplus前面加入# 并不是注解,可以通过执行如下命令关闭,set sqlprefix off

1.环境:
SCOTT@test01p> @ver1

PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

2.测试:
SCOTT@test01p> show sqlprefix
sqlprefix "#" (hex 23)

SCOTT@test01p> #select sysdate from dual;
SYSDATE
-------------------
2023-03-23 20:46:52

SCOTT@test01p> set sqlprefix off
SCOTT@test01p> #select sysdate from dual;
SP2-0734: unknown command beginning "#select sy..." - rest of line ignored.

SCOTT@test01p> set sqlprefix +
SCOTT@test01p> +select sysdate from dual;
SYSDATE
-------------------
2023-03-23 20:48:22



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2941979/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7971388