Join Vs SubQuery
about brief introduction on Join Vs SubQuery.
Join Vs SubQuery
E N D
Presentation Transcript
Join Vs SubQuery Submitted By Submitted To APURBA & SABIN IT DEPARTMENT
Topics Joins SubQuery Comparison Conclusion ThankYou
JOINS A join is a query that combines records from two or more tables. A join will be performed whenever multiple tables appear in the FROM clause of the query.
SUBQUERY A Subquery is a SELECT statement that is embedded in a clause of another SQL statement. They can be very useful to select rows from a table with a condition that depends on the data in the same or another table.
COMPARISON Join and subquery are both techniques used in SQL to retrieve data from multiple tables or perform complex queries. joins are used to combine data from multiple tables based on a relationship, while subqueries are used to perform operations on the result of another query. Both techniques have their own use cases and understanding their differences can help in choosing the appropriate approach for specific scenarios. :
Conclusion A subquery is easier to write,but a join might be better optimized by the server.