ORA-00923 - 找不到FROM关键字

时间:2014-02-25 23:41:46

标签: oracle oracle-sqldeveloper ora-00923

我收到此错误消息"在预期的地方找不到FROM关键字。"我做错了什么?

SELECT department_id
FROM employees
HAVING MIN(salary) < (SELECT MIN(salary)
         WHERE department_id < 60)
GROUP BY department_id;

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

你错过了一行:

SELECT MIN(salary)
         WHERE department_id < 60

需要

SELECT MIN(salary) FROM {TABLENAMEHERE}
         WHERE department_id < 60

完整查询:

SELECT department_id
FROM employees
GROUP BY department_id
HAVING MIN(salary) < (SELECT MIN(salary) FROM {TABLENAMEHERE}
         WHERE department_id < 60);