Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE price (
- start_price decimal(4,2) NOT NULL,
- price_date timestamp,
- PRIMARY KEY (start_price, price_date)
- );
- CREATE TABLE pricechange (
- start_price decimal(4,2) NOT NULL,
- new_price decimal(4,2) NOT NULL,
- price_date date NOT NULL,
- reason varchar(100),
- FOREIGN KEY (start_price, price_date)
- REFERENCES price(start_price, price_date)
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement