广告
返回顶部
首页 > 资讯 > 数据库 >ORA-00923: FROM keyword not found where expected
  • 323
分享到

ORA-00923: FROM keyword not found where expected

2024-04-02 19:04:59 323人浏览 安东尼
摘要

今天偶然查询oracle隐含参数,想在从网上找到大神写的语句中加一个描述参数作用的列,发生ORA-00923,做个记录 SYS@honor1 > select &nbs

今天偶然查询oracle隐含参数,想在从网上找到大神写的语句中加一个描述参数作用的列,发生ORA-00923,做个记录

SYS@honor1 > select
  2  x.ksppinm  name,
  3  y.ksppstvl  value,
  4  y.ksppstdf  isdefault,
  5  x.ksppdesc desc,
  6  decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')  ismod,
  7  decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE')  isadj
  8  from
  9  sys.x$ksppi x,
 10  sys.x$ksppcv y
 11  where
 12  x.inst_id = userenv('Instance') and
 13  y.inst_id = userenv('Instance') and
 14  x.indx = y.indx and x.ksppinm like '%&parameter%'
 15  order by
 16  translate(x.ksppinm, ' _', ' ')
 17  /
Enter value for parameter: policy
old  14: x.indx = y.indx and x.ksppinm like '%&parameter%'
new  14: x.indx = y.indx and x.ksppinm like '%policy%'
x.ksppdesc desc,
           *
ERROR at line 5:
ORA-00923: FROM keyWord not found where expected

经过仔细比对,该问题由于第五行,使用了系统保留关键字desc导致,改为describe,问题解决。

另外,对上述查询中ISMOD、ISADJ经过研究含义如下:

ISMODIFIED VARCHAR2(10) 
    Indicates whether the parameter has been modified after instance
    startup:
    • MODIFIED - Parameter has been modified with ALTER SESSioN
    • SYSTEM_MOD - Parameter has been modified with ALTER
        SYSTEM (which causes all the currently logged in sessions'
        values to be modified)
    • FALSE - Parameter has not been modified after instance startup
    
ISADJUSTED VARCHAR2(5) 
    Indicates whether Oracle adjusted the input value to a more
    suitable value (for example, the parameter value should be prime,
    but the user input a non-prime number, so Oracle adjusted the
    value to the next prime number)
您可能感兴趣的文档:

--结束END--

本文标题: ORA-00923: FROM keyword not found where expected

本文链接: https://www.lsjlt.com/news/47720.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作