What are the properties and different Types of Sub-Queries?


Properties of Sub-Query

  • A sub-query must be enclosed in the parenthesis.
  • A sub-query must be put in the right hand of the comparison operator.
  • A sub-query cannot contain an ORDER-BY clause.
  • A query can contain more than one sub-query.

Types of Sub-query

  • Single-row sub-query, where the sub-query returns only one row.
  • Multiple-row sub-query, where the sub-query returns multiple rows.
  • Multiple column sub-query, where the sub-query returns multiple columns