Database Reference
In-Depth Information
, City
FROM artist;
SELECT Name , Street , City
FROM artist ;
That's enough simple examples for now. Subsequent chapters examine a
multitude of variations and adaptations for SELECT statements. Next we
examine the different types of SELECT statements you can use.
4.2
Types of SELECT Queries
Different types of SELECT statement queries are as follows:
Simple queries simply retrieve rows, as we have already seen earlier in
this chapter.
Filtered queries return a subset of rows using the WHERE clause to
filter out unwanted rows.
Sorted queries use the ORDER BY clause to return rows in a speci-
fied order based on column values returned.
Grouping or aggregated queries create groupings or summaries of
larger row sets.
Join queries merge rows from more than one table, usually based on
matching column values between tables.
Subqueries are queries executed within other queries: a SELECT
statement executed within another calling SELECT statement.
Queries for table and view creation generate new tables and views
from the results of a SELECT statement.
Hierarchical queries build tree-like hierarchical output row structures
from hierarchical data.
Set operators and composite queries use special operators to concate-
nate results of different queries together.
Flashback or versions queries allow access to data at a previous point
in time.
Parallel queries execute SQL statements in parallel, preferably using
multiple CPU platforms and Oracle Partitioning.
Let's look at some of the query types briefly, starting with the simple
query.
 
Search WWH ::




Custom Search