What is a subquery in SQL, and how is it different from a regular query?

  • A subquery is a query nested within another query
  • A subquery is always used with the SELECT statement
  • A subquery is more efficient than a regular query
  • A subquery is used to retrieve data from multiple tables
A subquery in SQL is a query nested within another query, often used within the WHERE or HAVING clause. It is different from a regular query as it is embedded within another query and helps in retrieving data based on certain conditions or criteria.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *