The below are the few points to identify the differences between Joins and Sub Queries .
1. Joins are column-wise operations where as Sub Queries are are query wise operations. i.e in sub queries one query output depends on another query .
2. Joining is possible when table have some internal relation where as for Sub Queries internal relation is not required .
3. Joins checks the conditions first and then put it to temp table and displays the data where as in case of Sub Queries separate temp table will be created for checking conditions .
4. Sub Queries will takes more time if amount of data in a table is huge but the amount of data doesn't matter for Joins
5. In Joins we can view all selected columns from all selected tables where as in Sub Queries we can view the columns of outer query only .
1. Joins are column-wise operations where as Sub Queries are are query wise operations. i.e in sub queries one query output depends on another query .
2. Joining is possible when table have some internal relation where as for Sub Queries internal relation is not required .
3. Joins checks the conditions first and then put it to temp table and displays the data where as in case of Sub Queries separate temp table will be created for checking conditions .
4. Sub Queries will takes more time if amount of data in a table is huge but the amount of data doesn't matter for Joins
5. In Joins we can view all selected columns from all selected tables where as in Sub Queries we can view the columns of outer query only .
No comments:
Post a Comment