| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Overriding derived values
CREATE TABLE Discounts
(player_id CHAR(15) NOT NULL
REFERENCES Players (player_id)
ON DELETE CASCADE
ON UPDATE CASCADE,
start_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
end_date DATETIME,
discount_percent DECIMAL (3,2) DEFAULT 0.00 NOT NULL,
CHECK (start_date < end_date),
PRIMARY KEY (player_id, start_date));
Use a NULL to represent "eternity" and use a stored procedure to add one-month rows based on the bowler's average.
If they are not on the "permanent bad guy list" as shown by (end_date IS NULL), then leave the row until it is manually overridden. Received on Tue Nov 29 2005 - 18:37:42 CST
![]() |
![]() |