July 2010
Intermediate to advanced
840 pages
16h 33m
English
The Sequence table is a simple list of integers from 1 to (n) that is used in place of looping constructs in a procedural language. Rather than incrementing a counter value, we try to work in parallel with a complete set of values.
Unfortunately, SEQUENCE is a reserved word for a proposed construct in Standard SQL that builds a sequence of numbers, but handles them as if they were a list or file rather than a set. The same reserved word is found in Oracle, but not widely used in other products.
This table has the general declaration:
CREATE TABLE Sequence (seq INTEGER NOT NULL PRIMARY KEY CONSTRAINT non_negative_nbr CHECK (seq > 0) -- cardinal VARCHAR(25) NOT NULL, -- ordinal VARCHAR(25) NOT NULL, ... CONSTRAINT numbers_are_complete ...
Read now
Unlock full access