ORA-00923: 未找到要求的 FROM 關(guān)鍵字
在數(shù)據(jù)庫進(jìn)行查詢時(shí),提示報(bào)錯(cuò):ORA-00923: 未找到要求的 FROM 關(guān)鍵字
出現(xiàn)這種狀況一般是標(biāo)點(diǎn)符號寫的不正確
注意檢查括號、逗號、引號等符號的寫法是否正確
如下兩種:
(1) ORA-00923: 未找到要求的 FROM 關(guān)鍵字
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')
多了一個(gè)")",應(yīng)該為:
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
應(yīng)該是
select countime,avg(workers) from employee group by countime

標(biāo)簽: