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 :)