Just trying to wrap my head around the use of subqueries. Is it correct to say that they come in three main categories:

  1. Scalar: returns a single value
  2. Table-valued: Returns a table, to compare or add to the outer query.
  3. Correlated: Cannot be run as a stand-alone, must make use of data from outer query in order to run, to be executed.

Is this correct, or are there more categories? Or some subdivisions within the ones I wrote? Of course, there is, I guess, a degree of idiosyncrasy here.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.