文档解释 ORA-30563: outer join operator (+) not allowed in select-list, CONNECT BY, or START WITH Cause: An attempt was
ORA-30563: outer join operator (+) not allowed in select-list, CONNECT BY, or START WITH
Cause: An attempt was made to reference (+) in select-list, CONNECT BY clause, or START WITH clause.
Action: Do not use the operator in select-list, CONNECT BY clause, or START WITH clause.
当程序员试图在SELECT列表,CONNECT BY或START WITH子句中使用带有外连接操作符(+)的列时,就会出现ORA-30563错误。
在sql语句中,外连接操作符用于建立从一个表到另一个表的连接,但是本身是不能被用作SELECT列表,CONNECT BY或START WITH子句的。
使用外连接运算符(+)的列不能用于SELECT列表,CONNECT BY或START WITH子句。外连接的结果应该在WHERE子句中作为表达式指定。
例如,以下SQL语句会产生ORA-30563错误:
SELECT e.last_name, d.department_name
FROM employees e, departments d
WHERE e.department_id = d.department_id (+)
要解决此问题,必须分离外连接子句,将其放在WHERE子句中,而不是SELECT子句中获取每列值。
例如,可以更新该语句,如下所示:
SELECT e.last_name, d.department_name
FROM employees e, departments d
WHERE e.department_id = d.department_id (+)
AND d.department_name = ‘IT’;
--结束END--
本文标题: ORA-30563: outer join operator (+) not allowed in select-list, CONNECT BY, or START WITH ORACLE 报错 故
本文链接: https://lsjlt.com/news/532609.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0