SQL Command not properly ended?

前端 未结 2 1512
长情又很酷
长情又很酷 2020-12-07 01:37

I am using a SQL statement with a Temporary relation, and am getting the error ORA-009933: SQL command not properly ended

I don\'t see anything wrong wi

相关标签:
2条回答
  • 2020-12-07 01:52

    oracle does not support as for table aliases, only for column aliases and they are optional for that use => delete all as keywords ;)

    0 讨论(0)
  • 2020-12-07 02:11

    You shouldn't put the AS temp. When putting alias to a table (or subquery) you should only write the alias. This should work:

    SELECT Temp.name, Temp.AvgSalary 
    FROM ( SELECT A.aid, A.aname AS name, AVG(E.salary) AS AvgSalary 
           FROM Aircraft A, Certified C, Employees E)  Temp;
    

    Best regards,

    0 讨论(0)
提交回复
热议问题