oracle ORA-00903: 无效的表名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13392772/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:15:28  来源:igfitidea点击:

ORA-00903: invalid table name

sqloracle

提问by user1825861

I have the following database table:

我有以下数据库表:

CREATE TABLE pontaje
    (
    coda        NUMBER(4) REFERENCES angajati( coda ),
    data        DATE,           
    ore         NUMBER(3)   
    );

When I run the code :

当我运行代码时:

SELECT coda, SUM(ore) AS totalore
FROM   pontaje,
GROUP BY coda

I get ORA-00903: invalid table name.

我明白了ORA-00903: invalid table name

But I know the table exists because: SELECT * FROM pontajeworks.

但我知道该表存在是因为:SELECT * FROM pontaje有效。

回答by threenplusone

Remove the comma after the table name.

删除表名后的逗号。

回答by John Woo

SELECT coda, SUM(ore) AS totalore
FROM pontaje                       -- << remove comma
GROUP BY coda