ORACLE SQL错误-ORA-00933-执行联接操作-DBeaver

时间:2019-02-23 09:19:44

标签: sql oracle join table-alias

我正在尝试执行下一个:

SELECT l.id AS id
FROM s.process AS l 
JOIN s.item AS r ON l.id = r.id;

但是我得到了:

Query execution failed
Reason:
SQL Error [933] [42000]: ORA-00933: SQL command not properly ended

使用:

  • DBeaver
  • ojdbc7.jar作为驱动程序

2 个答案:

答案 0 :(得分:2)

定义表/视图的别名时,您必须删除AS

SELECT l.id AS id
FROM s.process l 
JOIN s.item r ON l.id = r.id;

答案 1 :(得分:1)

Oracle支持表别名,但它在SELECT列表中支持AS,但在FROM列表中不支持AS:

SELECT l.id AS id
FROM s.process l 
JOIN s.item r ON l.id = r.id;