2017-01-16 67 views
0
select * 
    from student3 
where marks > (select avg(marks) from table) 

失蹤時,我在甲骨文失蹤左括號錯誤

+3

'table'是一個保留關鍵字 – GurV

回答

1

運行的查詢作爲Gurvinder(@GurV)首先指出,發生左括號錯誤,table是Oracle保留關鍵字。您可以通過在雙引號轉義table與當前查詢進行,即

select * 
from student3 
where marks > (select avg(marks) from "table") 

但你可能要避免使用table來命名數據庫表。