• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Subqueries

A subquery is a query within a query. You can use subqueries to formulate a range of questions in SQL that are either difficult or impossible to represent using WHERE clauses and JOIN commands. The following sections provide some examples of how subqueries can be applied.

Subqueries for Columns

The stored procedure in the following example contains two subqueries that are used to determine values for columns:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint