This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Sequence generator in Oracle For this exercise, let’s create animals table. Create table animals ( animalID1 Number, animalID2 Number, animalID3 Number, animalID4 Number, name varchar (15) ); What is an Oracle sequence? - It’s a database object that enables to generate unique integer values. What is a purpose of creating a sequence? – Can use a sequence to generate the unique primary key values. SequenceName is the name of the sequence to be created. Increment by specifies an interval between the generated numbers. An interval can be either positive or negative integer, but cannot be 0. If the interval is negative, the sequence values are descending. If you don’t specify the increment value, it’s 1 by default. Start with specifies the initial value. If you don’t specify the starting value, it’s 0 by default. Z and w are the maximum and minimum possible values. the starting value, it’s 0 by default....
View Full Document
- Spring '09
- Yelena - TA
- Roy Thomas Baker, sequence values, SEQUENCE sequenceName INCREMENT