Does it make sense to replace sub-queries by join?
- by Roman
For example I have a query like that.
select col1 from t1 where col2>0 and col1 in (select col1 from t2 where col2>0)
As far as I understand, I can replace it by the following query:
select t1.col1 from t1
join (select col1 from t2 where col2>0) as t2
on t1.col1=t2.col1
where t1.col2>0
ADDED
In some answers I see join in other inner join. Are both right? Or they are even identical?