Hi Experts-
Just came across this scenario in Oracle 12c (12.1.0.2.0) where I am trying to delete from emp table by selecting non existing column(emp_name) from dep table as shown below, looks like it is executing successfully.
May I know the reason behind this design or how it will be helpful and what it is called? or is this kind of a bug?
--drop table emp;
CREATE TABLE emp (emp_name VARCHAR2(10));
--table EMP created.
--drop table dep;
CREATE TABLE dep (deptno NUMBER);
--table DEP created.
DELETE FROM emp WHERE emp_name IN (SELECT emp_name FROM dep);
--0 rows deleted.
Thank you,
Pradeep