重庆思庄Oracle、Redhat认证学习论坛

标题: ORA-00923: 未找到要求的 FROM 关键字 [打印本页]

作者: 刘泽宇    时间: 2021-11-14 18:02
标题: ORA-00923: 未找到要求的 FROM 关键字
在数据库进行查询时,提示报错:ORA-00923: 未找到要求的 FROM 关键字
出现这种状况一般是标点符号写的不正确
注意检查括号、逗号、引号等符号的写法是否正确
如下两种:
(1) ORA-00923: 未找到要求的 FROM 关键字
select to_char(AddTime,'yyyy-MM-DD')) GetDate,
sum(Amount) Amount,
count(ID) Count,
avg(Amount) AvgAmount
from Order where SiteID=26 group by to_char(AddTime,'yyyy-MM-DD')
多了一个")",应该为:
select to_char(AddTime,'yyyy-MM-DD') GetDate,
sum(Amount) Amount,
count(ID) Count,
avg(Amount) AvgAmount
from Order where SiteID=26 group by to_char(AddTime,'yyyy-MM-DD')

(2)select countime avg(workers) from employee group by countime
应该是
select countime,avg(workers) from employee group by countime





欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2