The client encountered a wrong output from two tables with IN SELECT statement, where table 1 = lo_stl_frontend has a column name called pagibigid, and table 2 = lms_stl_master doesn't have any column name called pagibigid but is returning a result. It turned out that this behavior works as per design and is SQL standards compliant. If a column does not exist in the table referenced in the FROM clause of a subquery but exists in a table referenced by the outer query's FROM clause, it is implicitly qualified by the table referenced in the FROM clause of the outer query.