ORA-00923: 未找到要求的 FROM 关键字

发布时间:2021-11-22 00:00:00

在数据库进行查询时,提示报错: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

<<