I have a MySQL query which I think would throw an exception, but it did not.Just want to figure out why? The query is :
select count(distinct uid)
from nov_visit_20161201
where pv_listen>0
and uid in (select distinct uid from nov_visit_20161120 where pv_listen>0);
the problem is table nov_visit_20161120 doesn't have a pv_listen column,but the query worked well. When I run the subquery alone:
select distinct uid from nov_visit_20161120 where pv_listen>0
I got this : "Unknown column 'pv_listen' in 'where clause'".
Anyone can tell me why?