Columns in SUB-Select are not correctly checked, when parsing Select- or Update-statement
Columns in SUB-Select are not correctly checked, when parsing Select- or Update-statement. (see below)
The problem can easily be reproduced with the tables "emp", "salgrade" from the SQLPlus demonstration tables.
(script demobld.sql in the ORACLE_HOME/sqlplus/demo directory )
1) Description of the used tables;
SQL> desc emp
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> desc salgrade
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
GRADE NUMBER
LOSAL NUMBER
HISAL NUMBER
2) Select-Statement with Sub-Select:
select * from emp where empno in (select empno from salgrade) ;
The problem can easily be reproduced with the tables "emp", "salgrade" from the SQLPlus demonstration tables.
(script demobld.sql in the ORACLE_HOME/sqlplus/demo directory )
1) Description of the used tables;
SQL> desc emp
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> desc salgrade
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
GRADE NUMBER
LOSAL NUMBER
HISAL NUMBER
2) Select-Statement with Sub-Select:
select * from emp where empno in (select empno from salgrade) ;
0