July 2010
Intermediate to advanced
840 pages
16h 33m
English
In a discussion on CompuServe in July 1996, Carl C. Federl came up with an interesting idea for multiple missing value tokens in a database.
If you program in embedded SQL, you are used to having to work with an INDICATOR column. This column is used to pass information to the host program, mostly about the NULL or NOT NULL status of the SQL column in the database. What the host program does with the information is up to the programmer. So why not extend this concept a bit and provide an indicator column in SQL? Let’s work out a simple example:
CREATE TABLE Bob (keycol INTEGER NOT NULL PRIMARY KEY, valcol INTEGER NOT NULL, multi_indicator INTEGER NOT NULL CHECK (multi_indicator IN (0, -- Known value 1, -- ...
Read now
Unlock full access