失踪左括号错误

问题描述:

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

失踪时,我在甲骨文失踪左括号错误

+3

'table'是一个保留关键字 – GurV

运行的查询作为Gurvinder(@GurV)首先指出,发生左括号错误,table是Oracle保留关键字。您可以通过在双引号转义table与当前查询进行,即

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

但你可能要避免使用table来命名数据库表。