Database Reference
In-Depth Information
13
Unusual Query Types
In this chapter:
What is a composite query and what are set operators?
What is a hierarchical query?
What are versions queries and what is flashback?
What are parallel queries?
Unusual query types are detailed in this chapter because they may be
rarely used. On the other hand, certain types of queries do not really belong
in previous chapters because they are either so obscure or just too compli-
cated, until now. We begin with composite queries.
13.1
Composite Queries
So what is a composite query? A composite query is simply a composite or
concatenation of two queries. Special set operators are used to concatenate
the results of two separate queries. There are certain restrictions, such as:
both SELECT column sets in the two queries, must have the same number
of columns, and datatypes must be compatible, dependent on SELECT
column list position. So what are the available set operators?
13.1.1
Set Operators
As already stated, set operators are used to combine two separate queries
into a single result set.
UNION ALL
. Retrieves all rows from both queries including dupli-
cates. Duplicate rows are rows returned by both queries.
Search WWH ::




Custom Search