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 ...
Get Oracle SQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.