Click here to Skip to main content
15,303,522 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
is join and sub-query are same or different. suggest me some readings for it...
Posted

   
Comments
Maciej Los 7-Nov-11 15:09pm
   
My 5!
   
Sure, a 5.
--SA
SubQuery: A query nested inside a SELECT statement is known as a subquery and is an alternative to complex join statements.
A subquery combines data from multiple tables and returns results that are inserted into the WHERE condition of the main query.
A subquery is always enclosed within parentheses and returns a column. A subquery can also be referred to as an inner query and the main query as an outer query.

Joins:SQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables.To learn more check this:

SQL Joins[^]

SQL joins are faster as compared to subqueries.

hope it helps :)
   
Comments
thatraja 7-Nov-11 10:57am
   
Fine, 5!
Uday P.Singh 8-Nov-11 0:59am
   
thanks raja :)
Maciej Los 7-Nov-11 15:20pm
   
My 5!
Uday P.Singh 8-Nov-11 0:59am
   
thanks :)
   
Very good, clear explanation, a 5.
--SA
Uday P.Singh 8-Nov-11 0:59am
   
thank you SA :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900