Database Reference
In-Depth Information
22
Sequences and Synonyms
In this chapter:
What is a sequence object?
What are the uses of sequences?
What is a synonym?
In recent chapters we have examined tables, views, constraints, indexes,
and clusters. Last but not least of the database objects we shall deal with
directly in this topic are sequences and synonyms.
Let's begin this chapter with sequences, usually called Oracle sequence
objects.
22.1
Sequences
A sequence allows for generation of unique, sequential values. Sequences
are most commonly used to generate unique identifying integer values for
primary and unique keys. Sequences are typically used in the types of SQL
statements listed as follows:
The VALUES clause of an INSERT statement.
A subquery SELECT list contained within the VALUES clause of an
INSERT statement.
The SET clause of an UPDATE statement.
A query SELECT list.
Search WWH ::




Custom Search