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 book 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access