Subquery vs Join

Showing Answers 1 - 3 of 3 Answers

pallavi

  • Aug 24th, 2005
 

The main difference betwen subquery and join is 
subquery is faster when we have to retrieve data from large number of tables.Because it becomes tedious to join more tables. 
join is faster to retrieve data from database when we have less number of tables

  Was this answer useful?  Yes

ravi wadalkar

  • Jan 2nd, 2006
 

subquery retrive the data depending on certain condition or manupulation in inner query.

where as joins will join the enitire data depending on the conditions given it cannot manupulate the data or we cannot be selective while using joins

  Was this answer useful?  Yes

Rajeev Ranjan

  • Jul 11th, 2007
 

We can be selective in joins query. e.g.

select e.name,d.city
from employee e
inner join detail d
on e.employee_id = d.employee_id and d.city in('aaa',bbbb','cccc')

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions