asked 30.1k views
1 vote
What is a subquery, and what are its basic characteristics?

1 Answer

4 votes
A subquery is a query(expressed as a SELECT statement) that is located inside another query. The first SQL statement is known as the outer query, the second is known as the inner query or subquery. The inner query or subquery is normally executed first. the output of the inner query is used as the input for the outer query. A subquery is normally expressed inside parenthesis and can return zero, one or more rows and each row can have one or more columns.
answered
User Ventolin
by
8.1k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.

Categories