In SQL, what is a subquery?

  • A query nested within another query
  • A query that returns aggregate data
  • A query used to create a new table
  • A query used to update records
A subquery in SQL, also known as a nested query or inner query, is a query nested within another SQL query. It is enclosed within parentheses and is executed first before the outer query. Subqueries are often used to retrieve data based on a condition or calculation from another table.
Add your answer
Loading...

Leave a comment

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